Re: WIP: default values for function parameters

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: WIP: default values for function parameters
Дата
Msg-id 200812111442.mBBEgx606731@momjian.us
обсуждение исходный текст
Ответ на Re: WIP: default values for function parameters  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: WIP: default values for function parameters  ("David E. Wheeler" <david@kineticode.com>)
Список pgsql-hackers
Pavel Stehule wrote:
> 2008/12/10 Pavel Stehule <pavel.stehule@gmail.com>:
> > 2008/12/10 Tom Lane <tgl@sss.pgh.pa.us>:
> >> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
> >>> next argument - if we accept AS for param names, then we introduce
> >>> nonconsistent behave with SQL/XML functions.
> >>
> >>> select xmlforest(c1, c2 as foo, c3) -- there foo isn't doesn't mean
> >>> "use it as param foo",
> >>
> >> It could be read as meaning that, I think.
> >>
> >> In any case, I'm not wedded to using AS for this, and am happy to
> >> consider other suggestions.
> 
> what do you thing about?
> 
> select fce(p1,p2,p3, SET paramname1 = val, paramname2 = val)
> 
> example
> select dosome(10,20,30, SET flaga = true, flagb = false)

I think AS read more naturally because you expect the parameter to come
first, not the SET keyword.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: visibility maps
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP: default values for function parameters