1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Remove hstore's text => text operator.

Since PostgreSQL 9.0, we've emitted a warning message when an operator
named => is created, because the SQL standard now reserves that token
for another use.  But we've also shipped such an operator with hstore.
Use of the function hstore(text, text) has been recommended in
preference to =>(text, text).  Per discussion, it's now time to take
the next step and stop shipping the operator.  This will allow us to
prohibit the use of => as an operator name in a future release if and
when we wish to support the SQL standard use of this token.

The release notes should mention this incompatibility.

Patch by me, reviewed by David Wheeler, Dimitri Fontaine and Tom Lane.
This commit is contained in:
Robert Haas
2011-11-07 21:47:45 -05:00
parent bbb6e559c4
commit b60653bc0b
5 changed files with 535 additions and 18 deletions

View File

@ -119,13 +119,6 @@ key => NULL
<entry><literal>{"z","x"}</literal></entry>
</row>
<row>
<entry><type>text</> <literal>=&gt;</> <type>text</></entry>
<entry>make single-pair <type>hstore</></entry>
<entry><literal>'a' =&gt; 'b'</literal></entry>
<entry><literal>"a"=&gt;"b"</literal></entry>
</row>
<row>
<entry><type>hstore</> <literal>||</> <type>hstore</></entry>
<entry>concatenate <type>hstore</>s</entry>
@ -224,14 +217,6 @@ key =&gt; NULL
</para>
</note>
<note>
<para>
The <literal>=&gt;</> 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>
@ -455,7 +440,7 @@ CREATE INDEX hidx ON testhstore USING HASH (h);
<para>
Add a key, or update an existing key with a new value:
<programlisting>
UPDATE tab SET h = h || ('c' =&gt; '3');
UPDATE tab SET h = h || hstore('c', '3');
</programlisting>
</para>