Re: named parameters in SQL functions

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: named parameters in SQL functions
Дата
Msg-id 4B003F0F.8070209@esilo.com
обсуждение исходный текст
Ответ на named parameters in SQL functions  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: named parameters in SQL functions
Re: named parameters in SQL functions
Список pgsql-hackers
Andrew Dunstan wrote:
> 
> 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?
> 

I like the special marker idea.  A '$' would be nice because its already in use 
for similar purposes, but I think that would lead to ambiguity with dollar quoting.

Would this be limited to sql functions?  I only ask because for non-sql 
functions we currently prefix parameter names with an underscore, but a built-in 
special marker would be much more desirable.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: named parameters in SQL functions
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: named parameters in SQL functions