summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-06-22 11:36:28 +0000
committerRobert Haas <rhaas@postgresql.org>2010-06-22 11:36:28 +0000
commit263ac11379cca4306bd938977a90400f9cc7cb98 (patch)
tree4f2bed845a84a05a993a043bf097ad345c6a384f /contrib
parent855d440a2f910d690deccfd5f81aaf6b190f16a8 (diff)
downloadpostgresql-263ac11379cca4306bd938977a90400f9cc7cb98.tar.gz
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/hstore/hstore.sql.in8
-rw-r--r--contrib/hstore/uninstall_hstore.sql3
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in
index 29a78ed052..67e85d6ed3 100644
--- a/contrib/hstore/hstore.sql.in
+++ b/contrib/hstore/hstore.sql.in
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/hstore/hstore.sql.in,v 1.11 2009/06/11 18:30:03 tgl Exp $ */
+/* $PostgreSQL: pgsql/contrib/hstore/hstore.sql.in,v 1.11.2.1 2010/06/22 11:36:28 rhaas Exp $ */
-- Adjust this setting to control where the objects get created.
SET search_path = public;
@@ -129,6 +129,12 @@ RETURNS hstore
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; -- not STRICT
+-- 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 17782d5c05..e8d0348615 100644
--- a/contrib/hstore/uninstall_hstore.sql
+++ b/contrib/hstore/uninstall_hstore.sql
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/contrib/hstore/uninstall_hstore.sql,v 1.8 2009/03/25 22:19:01 tgl Exp $ */
+/* $PostgreSQL: pgsql/contrib/hstore/uninstall_hstore.sql,v 1.8.2.1 2010/06/22 11:36:28 rhaas Exp $ */
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
@@ -26,6 +26,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);