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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function with default value not replacing old definition of the function
Дата
Msg-id 7348.1229008950@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function with default value not replacing old definition of the function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: Function with default value not replacing old definition of the function  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)