Re: Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic
Date
Msg-id 200506211846.j5LIka807604@candle.pha.pa.us
Whole thread Raw
In response to Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions)  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: Function's LEAST, GREATEST and DECODE (Oracle vararg  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
List pgsql-patches
This patch looks good.  I know greater/least are seen as valuable, but
do we want decode()?  It seems OK to me but I thought there was concern
about it in the past because it duplicated some existing functionality.

---------------------------------------------------------------------------

Pavel Stehule wrote:
> 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
>
>
>

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: dbsize backend integration
Next
From: Pavel Stehule
Date:
Subject: Re: Function's LEAST, GREATEST and DECODE (Oracle vararg