Re: Calling PL functions with named parameters
От | Jim C. Nasby |
---|---|
Тема | Re: Calling PL functions with named parameters |
Дата | |
Msg-id | 20040813225812.GI87347@decibel.org обсуждение исходный текст |
Ответ на | Re: Calling PL functions with named parameters (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Calling PL functions with named parameters
|
Список | pgsql-hackers |
On Fri, Aug 13, 2004 at 06:22:25PM -0400, Tom Lane wrote: > > On a related note, it would also be nice to have default > > parameters and some way to say to use them. > > That is fundamentally not ever going to happen, because it blows > overloaded-function resolution out of the water: there is no way to > choose whether "foo(42, 2.5)" matches foo(int, float) or > foo(int, float, something-with-a-default). Let's try to limit our > attention to something that might actually work. Actually, it is possible because Oracle does it. Presumably they treat a function with defaults as being the equivalent number of overloaded functions when functions are created, to ensure it can always resolve what function to call. IOW, their function resolution code treats a(int, int default 0) as being equivalent to a(int) and a(int, int). -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"
В списке pgsql-hackers по дате отправления: