Re: named parameters in SQL functions

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: named parameters in SQL functions
Дата
Msg-id 407d949e0911151121y1c706cbdge9a00d6b9263d62c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: named parameters in SQL functions  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: named parameters in SQL functions
Re: named parameters in SQL functions
Список pgsql-hackers
On Sun, Nov 15, 2009 at 6:26 PM, David E. Wheeler <david@kineticode.com> wrote:
>> Moreover you would still have conflicts possible because sql can quote
>> identifiers so people can have columns named "$foo". You would have a
>> weird syntactic detail where "$foo" would mean something different
>> than $foo even though they're both valid identifiers.
>
> Same with Foo and "Foo", no?

No, that's not the same.

The point is that $ is a perfectly valid SQL identifier character and
$foo is a perfectly valid identifier. You can always quote any
identifier (yes, after case smashing) so you would expect if $foo is a
valid identifier then "$foo" would refer to the same identifier.
You're introducing a meaning for $foo but saying there's no valid way
to quote the identifier to get the same thing. And worse, if you do
quote it you get something else entirely different.

-- 
greg


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Summary and Plan for Hot Standby
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: named parameters in SQL functions