From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Mario Weilguni <mweilguni(at)sime(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: C vs. C++ contributions |
Date: | 2002-08-29 18:32:31 |
Message-ID: | 200208291832.g7TIWVG13928@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Mario Weilguni wrote:
> Yes this is completly different. Oracle decode works like this:
>
> decode(value, choice1, result1, choice 2, result2, ......,
> default_result)
>
> it works this way: case
> when value=choice1 then result1 when value=choice2 then result2
> ....
> else default_result end
Yes, it would be nice to be able turn these on just for portability with
Oracle queries.
> The nice part is it has an varying number of arguments, and can
> used within "sort". Very useful sometimes.
With our CASE, you create a column using the CASE, then ODER BY on that
column.
> Another one very useful oracle function is "nvl", the same like
> "coalesce", but a lot easier to write :-)
Yes, another nice portability thing if it could be enabled/disabled.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-08-29 18:43:28 | Re: [Resend] Sprintf() auditing and a patch |
Previous Message | Tom Lane | 2002-08-29 17:18:14 | Re: SRF memory mgmt patch (was [HACKERS] Concern about memory management with SRFs) |