Re: WIP: default values for function parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: default values for function parameters
Дата
Msg-id 5767.1229094390@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: default values for function parameters  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: WIP: default values for function parameters  ("David E. Wheeler" <david@kineticode.com>)
Re: WIP: default values for function parameters  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> Hrm. I can see that, I guess. In that case, though, I think I'd prefer  
> the colon at the beginning of the parameter label:

>    SELECT foo( :bar => 'ick', :baz => 'ack' );

That's ugly, and incompatible with ecpg syntax, and what's the redeeming
value anyway?

In any case, whichever side you put the colon on, Pavel's proposal for
adding => to it is a nonstarter --- he's ignoring the possibility that
=> is defined as a prefix operator.

Hmm ... actually, ecpg might be a problem here anyway.  I know it has
special meaning for :name, but does it allow space between the colon
and the name?  If it does then the colon syntax loses.  If it doesn't
then you could do "name: value" as long as you were careful to leave
a space after the colon.
        regards, tom lane


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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: WIP: default values for function parameters
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: benchmarking the query planner