Re: coalesce and nvl question - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: coalesce and nvl question
Date
Msg-id 20040623184357.GB12411@wolff.to
Whole thread Raw
In response to Re: coalesce and nvl question  (Simon Windsor <simon.windsor@cornfield.org.uk>)
Responses Re: coalesce and nvl question  (Simon Windsor <simon.windsor@cornfield.org.uk>)
List pgsql-general
On Wed, Jun 23, 2004 at 19:10:05 +0100,
  Simon Windsor <simon.windsor@cornfield.org.uk> wrote:
> Hi
>
> I understand that null and '' are different, and MySQL and Oracle
> functions are confusing, but my question was not about replacing NULL
> but replacing Empty strings. These are handled in MySQL/Oracle by the
> same functions that do NULL checks.
>
> Is there a standard function in Postgres that replaces Empty strings, as
> against a NULL value.

Something like the following may suit your purposes:
coallesce(nullif(inputstring,''), 'replacement value')

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: coalesce and nvl question
Next
From: Lynna Landstreet
Date:
Subject: pgHoster.com woes and looking for a new host