From: | Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Cc: | neilc(at)samurai(dot)com, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <david(at)fetter(dot)org> |
Subject: | Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions) |
Date: | 2005-06-06 23:08:35 |
Message-ID: | Pine.LNX.4.44.0506062351480.16856-200000@kix.fsv.cvut.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers 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
Attachment | Content-Type | Size |
---|---|---|
greatest.diff | text/plain | 33.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-06-06 23:35:58 | Re: Suggestion: additional system views |
Previous Message | Robert Treat | 2005-06-06 22:36:27 | Re: Suggestion: additional system views |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-06-06 23:59:18 | Re: using strxfrm for having multi locale/please vote for |
Previous Message | Bruce Momjian | 2005-06-06 21:53:30 | Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL |