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

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Function with default value not replacing old definition of the function
Дата
Msg-id 162867790812102329s229725sb8a3e601b840f6b4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function with default value not replacing old definition of the function  ("Rushabh Lathia" <rushabh.lathia@gmail.com>)
Ответы Re: Function with default value not replacing old definition of the function  ("Rushabh Lathia" <rushabh.lathia@gmail.com>)
Список pgsql-hackers
2008/12/11 Rushabh Lathia <rushabh.lathia@gmail.com>:
>
>
> On Thu, Dec 11, 2008 at 12:40 PM, Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>>
>> Hello
>>
>>
>> when you created function, we cannot check defaults, because we don't
>> know if anybody use default or not. And when you call function, then
>> postgres prefer function with most similar function.
>
> Ok, but what if I want to call a second function with the default values.
> How can I call that function with default values?
>

it isn't possible yet (without DEFAULT keyword support).

you have to drop myfunc(int) first.

regards
Pavel Stehule

>>
>>
>> regards
>> Pavel Stehule
>>
>> >
>> > When create the same function again by added one default value, while
>> > calling the function old function getting called.
>> >
>> > It seems that, function with defval not making any sense, if we want to
>> > call
>> > the new function then we need to pass defval as well.
>> >
>> > select myfunc(10,10);
>> >
>> >  myfunc
>> > ----------
>> >       200
>> > (1 row)
>> >
>> > I think second function should replace the old definition of the
>> > function,
>> > inputs ?
>> >
>> >
>> > Thanks,
>> > Rushabh Lathia
>> > www.EnterpriseDB.com
>> >
>
>
>
> --
> Rushabh Lathia
> www.EnterpriseDB.com
>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Rushabh Lathia"
Дата:
Сообщение: Re: Function with default value not replacing old definition of the function
Следующее
От: "Rushabh Lathia"
Дата:
Сообщение: Re: Function with default value not replacing old definition of the function