Re: Variadic parameters vs parameter defaults
От | Pavel Stehule |
---|---|
Тема | Re: Variadic parameters vs parameter defaults |
Дата | |
Msg-id | 162867790812170955w6b42cfccvd651adda86063daf@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Variadic parameters vs parameter defaults (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Variadic parameters vs parameter defaults
|
Список | pgsql-hackers |
2008/12/17 Peter Eisentraut <peter_e@gmx.net>: > On Wednesday 17 December 2008 02:07:35 Tom Lane wrote: >> Oh, and another thing --- should variadic parameters be defaultable? >> The current patch doesn't allow it but it looks more like an oversight >> than anything that was thought through. The boundary case for variadic >> parameters is a bit weird already: >> >> regression=# create function fv (f1 int, f2 variadic int[]) returns int >> regression-# as 'select $1' language sql; >> CREATE FUNCTION > >> regression=# select fv(1); >> ERROR: function fv(integer) does not exist >> LINE 1: select fv(1); >> ^ >> HINT: No function matches the given name and argument types. You might >> need to add explicit type casts. > > That looks like a bug to me. Anything that you can do with 1 to N items > should also work for zero. > no, when we discused about variadic functions we defined, so variadic parameter should not be empty Please, look to archive. Pavel > Also, in C, variadic functions are quite commonly called with zero arguments > in the variadic position. > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers >
В списке pgsql-hackers по дате отправления: