From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)au>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: SQL question |
Date: | 2000-07-17 05:48:48 |
Message-ID: | 28464.963812928@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> Another alternative would be to define a 'coalesce' function (I don't think
> PG has one), which takes an arbitrary number of arguments and returns the
> first non-null one.
We surely do have that! It even works pretty well in 7.0 ;-)
(I think there were still some bugs lurking in 6.5.)
The immediate cause of this gripe was discussed just a day or so ago
on one or another of the pgsql lists. The timestamp-to-date conversion
routine has this weird idea that it should kick out an error instead
of returning NULL when presented with a NULL timestamp. That's a bug
IMHO, and I've already changed the code in current sources.
COALESCE would be a good workaround if you don't want to patch your
local copy of 7.0.*.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2000-07-17 06:23:22 | Re: SQL question |
Previous Message | Philip Warner | 2000-07-17 04:11:52 | Re: SQL question |