Commit b60653bc authored by Robert Haas's avatar Robert Haas

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.
parent bbb6e559
......@@ -5,7 +5,8 @@ OBJS = hstore_io.o hstore_op.o hstore_gist.o hstore_gin.o hstore_compat.o \
crc32.o
EXTENSION = hstore
DATA = hstore--1.0.sql hstore--unpackaged--1.0.sql
DATA = hstore--1.0.sql hstore--1.1.sql hstore--1.0--1.1.sql \
hstore--unpackaged--1.0.sql
REGRESS = hstore
......
/* contrib/hstore/hstore-1.0-1.1.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION hstore UPDATE TO '1.1'" to load this file. \quit
ALTER EXTENSION hstore DROP OPERATOR => (text, text);
DROP OPERATOR => (text, text);
This diff is collapsed.
# hstore extension
comment = 'data type for storing sets of (key, value) pairs'
default_version = '1.0'
default_version = '1.1'
module_pathname = '$libdir/hstore'
relocatable = true
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment