pgsql: Allow named parameters to be specified using => in addition to :

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow named parameters to be specified using => in addition to :
Date: 2015-03-10 15:12:38
Message-ID: E1YVLpm-0005RD-Ge@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow named parameters to be specified using => in addition to :=

SQL has standardized on => as the use of to specify named parameters,
and we've wanted for many years to support the same syntax ourselves,
but this has been complicated by the possible use of => as an operator
name. In PostgreSQL 9.0, we began emitting a warning when an operator
named => was defined, and in PostgreSQL 9.2, we stopped shipping a
=>(text, text) operator as part of hstore. By the time the next major
version of PostgreSQL is released, => will have been deprecated for a
full five years, so hopefully there won't be too many people still
relying on it. We continue to support := for compatibility with
previous PostgreSQL releases.

Pavel Stehule, reviewed by Petr Jelinek, with a few documentation
tweaks by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/865f14a2d31af23a05bbf2df04c274629c5d5c4d

Modified Files
--------------
doc/src/sgml/func.sgml | 2 +-
doc/src/sgml/syntax.sgml | 21 ++++++--
doc/src/sgml/xfunc.sgml | 6 +--
src/backend/commands/operatorcmds.c | 10 ----
src/backend/parser/gram.y | 11 +++-
src/backend/parser/scan.l | 6 +++
src/test/regress/expected/create_operator.out | 7 +--
src/test/regress/expected/polymorphism.out | 67 +++++++++++++++++++++++++
src/test/regress/sql/create_operator.sql | 2 +-
src/test/regress/sql/polymorphism.sql | 16 ++++++
10 files changed, 124 insertions(+), 24 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2015-03-10 15:37:23 pgsql: Fix stray sentence fragment in shared_preload_libraries document
Previous Message Alvaro Herrera 2015-03-09 20:44:41 pgsql: Keep CommitTs module in sync in standby and master