Function with default value not replacing old definition of the function

Поиск
Список
Период
Сортировка
От Rushabh Lathia
Тема Function with default value not replacing old definition of the function
Дата
Msg-id 460abcb10812102245n34f05579ree156c9e6b26edde@mail.gmail.com
обсуждение исходный текст
Ответы Re: Function with default value not replacing old definition of the function  (Peter Eisentraut <peter_e@gmx.net>)
Re: Function with default value not replacing old definition of the function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hi,<br /><br />Testcase: (8.4 CVS head)<br />====================<br /><br />CREATE OR REPLACE FUNCTION myfunc(y
int)<br/>RETURNS INTEGER AS $$<br />   select  100;<br />$$ language sql;<br /><br />CREATE OR REPLACE FUNCTION
myfunc(yint, x integer DEFAULT 100)<br /> RETURNS INTEGER AS $$<br />   select  200;<br />$$ language sql;<br /><br
/>selectmyfunc(10);<br /><br /> myfunc<br />----------<br />      100<br />(1 row) <br /><br />When create the same
functionagain by added one default value, while calling the function old function getting called. <br /><br />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.<br/><br />select myfunc(10,10);<br /><br /> myfunc<br /> ----------<br />       200<br /> (1 row) <br /><br />I
thinksecond function should replace the old definition of the function, inputs ?<br /><br /><br />Thanks,<br />Rushabh
Lathia<br/><a href="http://www.EnterpriseDB.com">www.EnterpriseDB.com</a><br /> 

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Multiplexing SUGUSR1
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Function with default value not replacing old definition of the function