From: simonw(at)cornfield(dot)org(dot)uk
To: pgsql-general(at)postgresql(dot)org
Subject:
Date: 2004-06-23 09:33:21
Message-ID: 20040623093321.5DCD1D1B170@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Subject: Coalesce, isEmpty and nvl

Message-Id: <E1Bd43P-000535-00(at)gaul(dot)cornfield(dot)org(dot)uk>
From: simonw(at)cornfield(dot)org(dot)uk
Date: Wed, 23 Jun 2004 10:28:27 +0100

Hi

I have an application that I am porting from MySQL to Postgres, and have hit a
problem with coalesce.

I assumed that coalesce() works like nvl() and ifnull and will return the 2nd
argument if the first is NULL or Empty String, just like Orcale/SQLServer with nvl()
or MySQL with ifnull().

Is there a simple way to implement this function other creating an nvl() function
with pg/PLSQL.

Finally, how efficient are pg/PLSQL functions at runtime? Are they re-parsed with
every call, or are parsed once only?

Many thanks

Simon

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.

Responses

  • Re: at 2004-06-29 20:21:20 from Franco Bruno Borghesi

Browse pgsql-general by date

  From Date Subject
Next Message Adam Witney 2004-06-23 09:47:25 FW: problems with installing postgres
Previous Message Michael Kleiser 2004-06-23 08:57:09 Re: setting autocommit off in pgsql