Re: Function with default value not replacing old definition of the function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Rushabh Lathia" <rushabh(dot)lathia(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, rushabh(dot)lathia(at)enterprisedb(dot)com
Subject: Re: Function with default value not replacing old definition of the function
Date: 2008-12-11 15:22:30
Message-ID: 7348.1229008950@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:
> no, it's little bit different

> Default is only stored parameter value. You created two functions with
> two different signatures

> myfunc(int)
> myfunc(int, int)

Yeah, we already bit this bullet with variadic functions --- if you have
myfunc(int, float)
myfunc(int, variadic float[])
then it's ambiguous which one should be used for call "myfunc(11, 12.5)".
The sanest answer I can see is "so, don't do that".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-12-11 15:33:11 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Previous Message Alvaro Herrera 2008-12-11 15:19:29 Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)