diff options
-rw-r--r-- | contrib/hstore/hstore.sql.in | 8 | ||||
-rw-r--r-- | contrib/hstore/uninstall_hstore.sql | 3 | ||||
-rw-r--r-- | doc/src/sgml/hstore.sgml | 18 |
3 files changed, 26 insertions, 3 deletions
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in index 29a78ed0529..67e85d6ed32 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 17782d5c058..e8d03486156 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); diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml index 48664b2b25b..44c1cfef238 100644 --- a/doc/src/sgml/hstore.sgml +++ b/doc/src/sgml/hstore.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/hstore.sgml,v 1.3 2009/03/15 22:05:17 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/hstore.sgml,v 1.3.2.1 2010/06/22 11:36:28 rhaas Exp $ --> <sect1 id="hstore"> <title>hstore</title> @@ -134,6 +134,14 @@ datatypes!) </para> + <note> + <para> + The <literal>=></> operator is deprecated and may be removed in a + future release. Use the <literal>hstore(text, text)</literal> function + instead. + </para> + </note> + <table id="hstore-func-table"> <title><type>hstore</> Functions</title> @@ -150,6 +158,14 @@ <tbody> <row> + <entry><function>hstore(text, text)</function></entry> + <entry><type>hstore</type></entry> + <entry>make single-item <type>hstore</></entry> + <entry><literal>hstore('a', 'b')</literal></entry> + <entry><literal>"a"=>"b"</literal></entry> + </row> + + <row> <entry><function>akeys(hstore)</function></entry> <entry><type>text[]</type></entry> <entry>get <type>hstore</>'s keys as array</entry> |