Re: named parameters in SQL functions - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: named parameters in SQL functions
Date
Msg-id 162867790911150951t6490486fwf1fd53d636ee1bda@mail.gmail.com
Whole thread Raw
In response to named parameters in SQL functions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
2009/11/15 Andrew Dunstan <andrew@dunslane.net>:
>
> At Tom's suggestion I am looking at allowing use of parameter names in SQL
> functions instead of requiring use of $1 etc. That raises the question of
> how we would disambiguate a parameter name from a column name. Essentially,
> ISTM, we could use some special marker such as @ (c.f. SQL Server) or :
> (c.f. ecpg) or else we could have some rule that says which name takes
> precedence. I think I prefer a special marker, other things being equal. Is
> there a standard on this?

what about $name ?

Personally I prefer :name, but this colidates with psql local variables :(

Pavel

>
> cheers
>
> andrew
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: named parameters in SQL functions
Next
From: Simon Riggs
Date:
Subject: Re: Summary and Plan for Hot Standby