Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions)

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions)
Дата
Msg-id Pine.LNX.4.44.0506062351480.16856-200000@kix.fsv.cvut.cz
обсуждение исходный текст
Ответы Re: Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Hello

    This patch contains three oracle users missing functions. But I
hope can be usefull for all PostgreSQL users (users vote me ;-) Certainly
LEAST and GREATEST, which has not analogy. Using of DECODE is similar
CASE, but with some differences. There exist some workarounds in plpgsql,
but are ugly and neefective, or impossible (function DECODE rotate type of
args). All functions share code.

David, please, can you enhance documentation?

pokus=# select least(1,2,3,4);
 least
-------
     1
(1 row)

pokus=# select greatest(1,2,3,4);
 greatest
----------
        4
(1 row)

pokus=# select decode('c','a',2,1);
 decode
--------
      1

Best regards
Pavel Stehule




Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: using strxfrm for having multi locale/please vote for