Re: Oracle Decode Function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Oracle Decode Function
Дата
Msg-id 18835.1027611617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Oracle Decode Function  (Marc Lavergne <mlavergne-pub@richlava.com>)
Список pgsql-hackers
Marc Lavergne <mlavergne-pub@richlava.com> writes:
> If you're asking about whether a custom function can have vararg 
> parameters, the answer appears to depend on the CREATE FUNCTION
> syntax. 

Can't do it, though you could imagine creating a family of functions
of the same name and different numbers of parameters.  Trying to
emulate DECODE this way would have a much worse problem: what's the
datatype of the parameters?  (Or the result?)

Use CASE; it does more than DECODE *and* is ANSI-standard.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: bug in COPY
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: why?