From: Pavel Stehule on 28 May 2010 10:08 2010/5/28 Tom Lane <tgl(a)sss.pgh.pa.us>: > Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> writes: >>> Peter Eisentraut<peter_e(a)gmx.net> Â writes: >>>> How about >>>> select myfunc(a := 7, b := 6); > >> If we go with that, should we make some preparations to allow => in the >> future? Like provide an alternative operator name for hstore's =>, and >> add a note somewhere in the docs to discourage other modules from using =>. > > I'd vote no. Â We're intentionally choosing to deviate from a very poor > choice of notation. Â Maybe Peter can interest the committee in allowing > := as an alternate notation, instead. -1 I prefer a standard. And again - it isn't poor syntax - ADA, Perl use it, It can be a funny if ANSI SQL committee change some design from Oracle's proposal to PostgreSQL's proposal. Regards Pavel > > Â Â Â Â Â Â Â Â Â Â Â Â regards, tom lane > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Andrew Dunstan on 28 May 2010 10:26 Tom Lane wrote: > Heikki Linnakangas <heikki.linnakangas(a)enterprisedb.com> writes: > >>> Peter Eisentraut<peter_e(a)gmx.net> writes: >>> >>>> How about >>>> select myfunc(a := 7, b := 6); >>>> > > >> If we go with that, should we make some preparations to allow => in the >> future? Like provide an alternative operator name for hstore's =>, and >> add a note somewhere in the docs to discourage other modules from using =>. >> > > I'd vote no. We're intentionally choosing to deviate from a very poor > choice of notation. Maybe Peter can interest the committee in allowing > := as an alternate notation, instead. > > > What's poor about it? It probably comes from PLSQL which in turn got it from Ada, so they aren't just making this up. I agree it's inconvenient for us, but that's a different issue. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Josh Berkus on 28 May 2010 12:19 > What's poor about it? It probably comes from PLSQL which in turn got it > from Ada, so they aren't just making this up. I agree it's inconvenient > for us, but that's a different issue. Further, the ( parameter := value ) notation is not only consistent with what is used inside pl/pgsql, it's also more consistent than "AS" with SQL Server's named parameter notation, which is: EXEC dbo.GetItemPrice @ItemCode = 'GXKP', @PriceLevel = 5 Since former SQL Server / Sybase apps are the most likely to use named parameter notation in PostgreSQL, having a syntax which could be ported using only "sed" would be nice. Relevant to the whole discussion, though ... is the conflicting SQL standard syntax something we're every likely to implement? -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Andrew Dunstan on 28 May 2010 12:45 Bruce Momjian wrote: > Josh Berkus wrote: > >> Since former SQL Server / Sybase apps are the most likely to use named >> parameter notation in PostgreSQL, having a syntax which could be ported >> using only "sed" would be nice. >> >> Relevant to the whole discussion, though ... is the conflicting SQL >> standard syntax something we're every likely to implement? >> > > Not sure, but I assume people could be using the AS syntax in other > databases (for the inheritance usage) and then trying to use it in our > database. > > Yeah. Whether or not we ever implement it really doesn't matter, IMO. We should not be in the business of taking an SQL standard piece of syntax and using it for some other purpose. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Heikki Linnakangas on 28 May 2010 13:25
On 28/05/10 19:19, Josh Berkus wrote: > ( parameter := value ) notation is not only consistent with what is used > inside pl/pgsql, it's also more consistent than "AS" with SQL Server's > named parameter notation, which is: > > EXEC dbo.GetItemPrice @ItemCode = 'GXKP', @PriceLevel = 5 > > Since former SQL Server / Sybase apps are the most likely to use named > parameter notation in PostgreSQL, having a syntax which could be ported > using only "sed" would be nice. Once you solve the problem of finding the '='s in the source, replacing them is exactly the same effort regardless of what you replace them with. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |