From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | deprecating =>, take two |
Date: | 2010-06-21 16:20:59 |
Message-ID: | AANLkTil04pHZTpEVMT0AinXSCOitwXoRrAow4-kPVz7q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
By consensus, we have removed the new-to-9.0 operator text[] => text[]
and renamed the hstore => text[] operator. (The current name is "%",
but there is some discussion of "%>", some yet other name, or getting
rid of it altogether; please comment on that thread if you wish to
weigh in.) This means that the only remaining => operator in CVS is
the text => text operator which constructs a single-element hstore,
which has been around since 8.2. In lieu of providing a substitute
operator, Tom Lane proposed that we simply encourage people to use the
hstore(text, text) function which does the same thing:
http://archives.postgresql.org/pgsql-hackers/2010-06/msg00711.php
Per that email, and subsequent concurrence, here is a series of
patches which does the following:
1. In CVS HEAD, document the hstore(text, text) function and adjust
CREATE OPERATOR to throw a warning when => is used as an operator
name, using the wording previously suggested by Tom.
2. In the back branches, add an hstore(text, text) function. These
branches already have a tconvert(text, text) function which does the
same thing, but the consensus seemed to be that we do not want to go
back to the name tconvert() for this functionality, and that
back-patching the new name was preferable.
3. In 8.4 and 8.3, also add hstore(text, text) to the documentation.
8.2 appears to have no contrib documentation.
Barring vigorous objections, I will apply these tomorrow so that we
can consider deprecating => as an operator name in 9.1, for better
compliance with the SQL standard.
http://archives.postgresql.org/pgsql-hackers/2010-05/msg01501.php
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
Attachment | Content-Type | Size |
---|---|---|
hstore_82.patch | application/octet-stream | 1.0 KB |
hstore_83.patch | application/octet-stream | 1.6 KB |
hstore_84.patch | application/octet-stream | 1.6 KB |
hstore_90.patch | application/octet-stream | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2010-06-21 16:28:18 | Re: extensible enum types |
Previous Message | Tom Lane | 2010-06-21 15:01:05 | Re: extensible enum types |