Re: Function with default value not replacing old definition of the function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function with default value not replacing old definition of the function
Date
Msg-id 7348.1229008950@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function with default value not replacing old definition of the function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: Function with default value not replacing old definition of the function  (Dimitri Fontaine <dfontaine@hi-media.com>)
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@gmail.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 havemyfunc(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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Next
From: Bruce Momjian
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)