Re: named parameters in SQL functions

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: named parameters in SQL functions
Дата
Msg-id FB26797F-AFD5-40BF-868F-ABB13978387C@kineticode.com
обсуждение исходный текст
Ответ на Re: named parameters in SQL functions  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Nov 15, 2009, at 10:54 AM, Greg Stark wrote:

> I'm japh too -- but that doesn't mean grabbing one little aesthetic
> from Perl without copying the whole concept behind it makes any sense.
> Perl sigils are an important part of the language and are a basic part
> of the syntax. They aren't just a "this is a variable" marker.
> Dropping one use of them into a language that doesn't use them
> anywhere else just makes the language into a mishmash.

Well, no, just because we're talking about adopting $var doesn't mean we're trying to turn SQL or PL/pgSQL into Perl.
Itmeans that we want to signify that a token is a variable, as opposed to something else (hence “sigil”). That doesn't
makeit a mishmash unless you think you suddenly have Perl (or shell) semantics, which would be a pretty weird
expectation.

> I don't see any purpose to using such markers anyways. We have a
> parser, we have a symbol table, we should use them; these identifiers
> are just like other identifiers.

See the discussion of conflicts with column names in the recent thread. A sigil would eliminate that problem -- and we
alreadyhave $1 and friends, so this is just an extension of that in my view. 

Best,

David

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

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