Re: proposal: ANSI SQL 2011 syntax for named parameters - Mailing list pgsql-hackers

From Gavin Flower
Subject Re: proposal: ANSI SQL 2011 syntax for named parameters
Date
Msg-id 50DE11F7.30506@archidevsys.co.nz
Whole thread Raw
In response to Re: proposal: ANSI SQL 2011 syntax for named parameters  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: proposal: ANSI SQL 2011 syntax for named parameters
List pgsql-hackers
<div class="moz-cite-prefix">On 29/12/12 10:19, Peter Eisentraut wrote:<br /></div><blockquote
cite="mid:50DE0CFD.6060508@gmx.net"type="cite"><pre wrap="">On 12/28/12 11:22 AM, Pavel Stehule wrote: 
</pre><blockquote type="cite"><pre wrap="">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)
</pre></blockquote><pre wrap="">
I agree it's probably time.

</pre><blockquote type="cite"><pre wrap="">* should we support both - probably yes
</pre></blockquote><pre wrap="">
yes

</pre><blockquote type="cite"><pre wrap="">* how long time we will support pg syntax? - 2..5..ever years

* when we mark pg syntax as obsolete?

* when we remove pg syntax?
</pre></blockquote><pre wrap="">
The := syntax was introduced in 9.0, so it is by now well entrenched.  I
don't think we should remove it at all any time soon.

As for documentation, just state how it is.  The standard syntax is =>,
but because of $various_issues, older versions only support :=.



</pre></blockquote><font size="-1">To be honest I prefer </font><b>:=</b> as it looks neater than <b>=></b>, in part
becauseI first saw that notation when I was learning ALGOL 60 and liked the justification they gave in the manual. <br
/><br/> In fact I find <b>=></b> ugly and counter intuitive as I keep having the feeling that it points the wrong
way,because <b>A => 2</b> suggests to me that you are setting '2' to the value of 'A' which is plain daft!<br /><br
/>I am sure there are worse standardisation formats - but for some reason, I find this one disproportionately
irritating! :-)<br /><br /> So I would much prefer to keep the old format, if at all possible.<br /><br /><br />
Cheers,<br/> Gavin<br /><br /><br /><br /><br /> 

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: proposal: ANSI SQL 2011 syntax for named parameters
Next
From: Peter Eisentraut
Date:
Subject: Re: dynamic SQL - possible performance regression in 9.2