Re: WIP: named and mixed notation support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: named and mixed notation support
Date: 2009-03-02 02:03:09
Message-ID: 18329.1235959389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2009-03-02 02:11:45 Re: Synchronous replication & Hot standby patches
Previous Message Tom Lane 2009-03-02 01:49:23 Re: patch for space around the FragmentDelimiter