aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-06-22 11:36:44 +0000
committerRobert Haas <rhaas@postgresql.org>2010-06-22 11:36:44 +0000
commitb12ca1d56136db61d141ad160236b9f745bb354f (patch)
tree0f3ce0db896509aeb040828205b066870ce1cfea
parent0a557605f2e9efe3ea08392b308605f9fd3499c8 (diff)
downloadpostgresql-b12ca1d56136db61d141ad160236b9f745bb354f.tar.gz
postgresql-b12ca1d56136db61d141ad160236b9f745bb354f.zip
Deprecate the use of => as an operator name.
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.
-rw-r--r--contrib/hstore/hstore.sql.in6
-rw-r--r--contrib/hstore/uninstall_hstore.sql1
2 files changed, 7 insertions, 0 deletions
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in
index 95cecf15d29..4e7c494694b 100644
--- a/contrib/hstore/hstore.sql.in
+++ b/contrib/hstore/hstore.sql.in
@@ -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,
diff --git a/contrib/hstore/uninstall_hstore.sql b/contrib/hstore/uninstall_hstore.sql
index bfa2e738dce..f0b9fa5e7be 100644
--- a/contrib/hstore/uninstall_hstore.sql
+++ b/contrib/hstore/uninstall_hstore.sql
@@ -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);