Re: IFNULL -> COALESCE - Mailing list pgsql-hackers

From Lee Kindness
Subject Re: IFNULL -> COALESCE
Date
Msg-id 15460.2063.311288.503373@kelvin.csl.co.uk
Whole thread Raw
In response to Re: IFNULL -> COALESCE  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: IFNULL -> COALESCE  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: IFNULL -> COALESCE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Christopher Kings-Lynne writes:> lkindness@csl.co.uk writes:> >  SELECT COALESCE(MAX(id), 0) + 1 from test;> > can be
replacedby the following PostgreSQL query:> >  SELECT COALESCE(MAX(id), 0) + 1 from test;> Ummm...did you make a
mistakehere?  Those statements are> identical...
 

Okay, lets try that again...
 SELECT IFNULL(MAX(id), 0) + 1 from test;

can be replaced by the following PostgreSQL query:
 SELECT COALESCE(MAX(id), 0) + 1 from test;

Thanks, Lee.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: GiST on 64-bit box
Next
From: Karel Zak
Date:
Subject: Re: Threaded PosgreSQL server