Re: WIP: named and mixed notation support

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: named and mixed notation support
Дата
Msg-id 18329.1235959389@sss.pgh.pa.us
обсуждение исходный текст
Ответ на WIP: named and mixed notation support  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: WIP: named and mixed notation support
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> postgres=# create function dfunc(a int, b int = 1, c int) returns
> table (a int, b int, c int) as $$
>   select $1, $2, $3;
> $$ language sql;

The above is simply a horrid idea.  It'll completely break any ability
to resolve ambiguous function calls in a sane way.  What, for example,
will you do given "dfunc(1,2)" and alternatives

create function dfunc(a int, b int = 1, c int) ...
create function dfunc(a int, b int, c int = 1) ...

We should *not* remove the restriction that all parameters after the
first one with a default also have to have defaults.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: patch for space around the FragmentDelimiter
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Synchronous replication & Hot standby patches