On May 16, 2008, at 6:54 PM, Alban Hertroys wrote:
development=> select b, coalesce( (b in (1, null))::text, 'NULL')
from test;
b | coalesce
---+----------
1 | true
2 | NULL
| NULL
(3 rows)
Just remembered a nice option from psql that doesn't quite clutter my
example as much:
development=> \pset null '<NULL>'
Null display is "<NULL>".
development=> select b, b in (1, null) from test;
b | ?column?
--------+----------
1 | t
2 | <NULL>
<NULL> | <NULL>
(3 rows)
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,482dbd32927664852116061!