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