Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2Pw3-0000e8-EQ for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Feb 2013 17:34:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2Pw1-0001Zb-Cx for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Feb 2013 17:34:25 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2Pw0-0001ZR-0m for pgsql-hackers@postgresql.org; Mon, 04 Feb 2013 17:34:24 +0000 Received: from mbx.knossos.net.nz ([202.160.48.10]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2Pvx-0002Wb-Nk for pgsql-hackers@postgresql.org; Mon, 04 Feb 2013 17:34:23 +0000 Received: from [10.1.1.3] (60-234-150-59.bitstream.orcon.net.nz [60.234.150.59]) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id r14HY4Y2029867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 5 Feb 2013 06:34:05 +1300 Message-ID: <510FF10C.20809@archidevsys.co.nz> Date: Tue, 05 Feb 2013 06:34:04 +1300 From: Gavin Flower Organization: ArchiDevSys User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pavel Stehule CC: Robert Haas , PostgreSQL Hackers , Peter Eisentraut Subject: Re: proposal: ANSI SQL 2011 syntax for named parameters References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------040208060806010604060805" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------040208060806010604060805 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 04/02/13 21:55, Pavel Stehule wrote: > 2013/1/2 Robert Haas : >> On Fri, Dec 28, 2012 at 11:22 AM, Pavel Stehule wrote: >>> I am not sure, but maybe is time to introduce ANSI SQL syntax for >>> functions' named parameters >>> >>> It is defined in ANSI SQL 2011 >>> >>> CALL P (B => 1, A => 2) >>> >>> instead PostgreSQL syntax CALL ( B := 1, A := 2) >> Keep in mind that, as recently as PostgreSQL 9.1, we shipped hstore >> with a =>(text, text) operator. That operator was deprecated in 9.0, >> but it wasn't actually removed until PostgreSQL 9.2. Whenever we do >> this, it's going to break things for anyone who hasn't yet upgraded >> from hstore v1.0 to hstore v1.1. So I would prefer to wait one more >> release. That way, anyone who does an upgrade, say, every other major >> release cycle should have a reasonably clean upgrade path. >> >> I realize that the 4+-year journey toward allowing => rather than := >> probably seems tedious to many people by now, but I think the cautious >> path we've taken is entirely warranted. As much as I want us to be >> standards-compliant in this area, I also want us to not break any more >> user applications than necessary along the way. >> >> Incidentally, I think there are two changes here which should be >> considered independently. One, allowing => rather than := for >> specifying named parameters. And two, adding a statement called CALL >> that can be used to invoke a function. Maybe those are both good >> ideas and maybe they aren't, but they're independent. >> > can I recapitulate a plan? > > * enabling '=>' in 9.4 > * we will support ':=' too > > What we can (or have to) do now? > > Regards > > Pavel > > > >> -- >> Robert Haas >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > I prefer ':=', as I like the ALGOL justification of it. But I won't even threaten to hold my breath if I'm not allowed to use ':='! :-) Cheers, Gavin --------------040208060806010604060805 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mbx.knossos.net.nz id r14HY4Y2029867
On 04/02/13 21:55, Pavel Stehule wrote= :
2013/1/2 Robert Haas <robertmhaas@gmail.com>:
On Fri, Dec 28, 2012 at 11:22 AM, Pavel Stehule =
<pavel.stehule@gmail.com> wrote:
I am not sure, but maybe is time to introduce AN=
SI SQL syntax for
functions' named parameters

It is defined in ANSI SQL 2011

 CALL P (B =3D> 1, A =3D> 2)

instead PostgreSQL syntax CALL ( B :=3D 1, A :=3D 2)
Keep in mind that, as recently as PostgreSQL 9.1, we shipped hstore
with a =3D>(text, text) operator.  That operator was deprecated in 9.0=
,
but it wasn't actually removed until PostgreSQL 9.2.  Whenever we do
this, it's going to break things for anyone who hasn't yet upgraded
from hstore v1.0 to hstore v1.1.  So I would prefer to wait one more
release.  That way, anyone who does an upgrade, say, every other major
release cycle should have a reasonably clean upgrade path.

I realize that the 4+-year journey toward allowing =3D> rather than :=3D
probably seems tedious to many people by now, but I think the cautious
path we've taken is entirely warranted.  As much as I want us to be
standards-compliant in this area, I also want us to not break any more
user applications than necessary along the way.

Incidentally, I think there are two changes here which should be
considered independently.  One, allowing =3D> rather than :=3D for
specifying named parameters.  And two, adding a statement called CALL
that can be used to invoke a function.  Maybe those are both good
ideas and maybe they aren't, but they're independent.

can I recapitulate a plan?

* enabling '=3D>' in 9.4
* we will support ':=3D' too

What we can (or have to) do now?

Regards

Pavel



--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

I prefer ':=3D', as I like the ALGOL justification = of it.

But I won't even threaten to hold my breath if I'm not allowed to use ':=3D'!=C2=A0 = :-)


Cheers,
Gavin
--------------040208060806010604060805--