Re: WIP: Allow SQL-language functions to reference parameters by parameter name

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: Andrew Dunstan <andrew@dunslane.net>, David Fetter <david@fetter.org>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Matthew Draper <matthew@trebex.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-03-27T17:30:43Z
Lists: pgsql-hackers
2011/3/27 Martijn van Oosterhout <kleptog@svana.org>:
> On Sun, Mar 27, 2011 at 06:52:03PM +0200, Pavel Stehule wrote:
>> Syntax for named parameters should be consistent with prepared
>> statement. Is there any comments in standard?
>
> Well, there's section 4.24 which says:
>
> "In SQL-statements that are executed dynamically, the parameters are
> called dynamic parameters (<dynamic parameter specification>s) and are
> represented in SQL language by a <question mark> (?)."
>

ok, so my preferences:

1. no prefix - using a qualified identifiers - it's consistent with
plpgsql and sql/psm
2 :name - it uses a Oracle and it can help to people who migrate from Oracle
3. $name - it is like enhancing of $number parameters - lot of
languages uses this notation

Regards

Pavel Stehule


> which I think we can all agree is not a useful guide.
>
> Have a nice day,
>
> --
> Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
>> Patriotism is when love of your own people comes first; nationalism,
>> when hate for people other than your own comes first.
>>                                       - Charles de Gaulle
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD8DBQFNj2+UIB7bNG8LQkwRAjGeAJ99K0Zrp1EM/ike6h+cL5ZEH1Lb2QCfY28L
> 7ETpiWfLtD90ISCVMvEgaSs=
> =YEx2
> -----END PGP SIGNATURE-----
>
>