Re: Needed function IF(expr, expr, expr) - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Needed function IF(expr, expr, expr)
Date
Msg-id 20030906154338.GB24418@wolff.to
Whole thread Raw
In response to Needed function IF(expr, expr, expr)  ("Marek Lewczuk" <newsy@lewczuk.com>)
Responses Re: Needed function IF(expr, expr, expr)  ("Marek Lewczuk" <newsy@lewczuk.com>)
List pgsql-general
On Sat, Sep 06, 2003 at 14:55:12 +0100,
  Marek Lewczuk <newsy@lewczuk.com> wrote:
> Hello,
> I'm moving out from MySQL to PostgreSQL and there are some function
> which are not supported in PG so I'm trying to write my own functions.
> Currently I have big problem with function IF(), below the description
> of this function from MySQL manual.

You should be able to do what you want using CASE instead of IF.

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Needed function IF(expr, expr, expr)
Next
From: "Marek Lewczuk"
Date:
Subject: Re: Needed function IF(expr, expr, expr)