]> granicus.if.org Git - postgresql/commitdiff
Deprecate the use of => as an operator name.
authorRobert Haas <rhaas@postgresql.org>
Tue, 22 Jun 2010 11:36:44 +0000 (11:36 +0000)
committerRobert Haas <rhaas@postgresql.org>
Tue, 22 Jun 2010 11:36:44 +0000 (11:36 +0000)
In HEAD, emit a warning when an operator named => is defined.
In both HEAD and the backbranches (except in 8.2, where contrib
modules do not have documentation), document that hstore's text =>
text operator may be removed in a future release, and encourage the
use of the hstore(text, text) function instead.  This function only
exists in HEAD (previously, it was called tconvert), so backpatch
it back to 8.2, when hstore was added.  Per discussion.

contrib/hstore/hstore.sql.in
contrib/hstore/uninstall_hstore.sql

index 95cecf15d29c95b08f95733f39d11bfe5147cf93..4e7c494694ba308563815b5c83a58ecf2dc43972 100644 (file)
@@ -118,6 +118,12 @@ RETURNS hstore
 AS 'MODULE_PATHNAME'
 LANGUAGE 'C' with (isstrict,iscachable);
 
+-- For forward compatibility with PostgreSQL >= 9.0
+CREATE OR REPLACE FUNCTION hstore(text,text)
+RETURNS hstore
+AS 'MODULE_PATHNAME', 'tconvert'
+LANGUAGE C IMMUTABLE; -- not STRICT
+
 CREATE OPERATOR => (
        LEFTARG = text,
        RIGHTARG = text,
index bfa2e738dce2ffcddaba5c99c723b82fc34b8028..f0b9fa5e7bec151b3ad9d7b814441a7cb90b8cee 100644 (file)
@@ -21,6 +21,7 @@ DROP FUNCTION hs_concat(hstore,hstore);
 DROP FUNCTION hs_contains(hstore,hstore);
 DROP FUNCTION hs_contained(hstore,hstore);
 DROP FUNCTION tconvert(text,text);
+DROP FUNCTION hstore(text,text);
 DROP FUNCTION akeys(hstore);
 DROP FUNCTION avals(hstore);
 DROP FUNCTION skeys(hstore);