Re: WIP: named and mixed notation support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: named and mixed notation support
Date
Msg-id 18329.1235959389@sss.pgh.pa.us
Whole thread Raw
In response to WIP: named and mixed notation support  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: WIP: named and mixed notation support
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: patch for space around the FragmentDelimiter
Next
From: Fujii Masao
Date:
Subject: Re: Synchronous replication & Hot standby patches