Re: Variadic parameters vs parameter defaults
От | Brendan Jurd |
---|---|
Тема | Re: Variadic parameters vs parameter defaults |
Дата | |
Msg-id | 37ed240d0812161718o2fa816d1ya6c79932734b2c28@mail.gmail.com обсуждение исходный текст |
Ответ на | Variadic parameters vs parameter defaults (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Variadic parameters vs parameter defaults
|
Список | pgsql-hackers |
On Wed, Dec 17, 2008 at 11:07 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > ISTM one could make a pretty good argument that this last case should > succeed, producing an empty-array argument. If you buy that, then it > is sensible to forbid defaults for variadics, Yep, +1 for this approach. I would intuitively expect that, if I omit variadic argument(s) when calling a function, that the function ends up getting an empty array of the appropriate type. And when writing a variadic function, I wouldn't find it all surprising or annoying if I was not allowed to override this default. In the unlikely case I want my function to do something special when it gets an empty array, I can write that behaviour into the function body. Cheers, BJ
В списке pgsql-hackers по дате отправления: