Re: nullif('','') on insert - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: nullif('','') on insert
Date
Msg-id 20050827135629.GA1965@wolff.to
Whole thread Raw
In response to Re: nullif('','') on insert  (Chris Travers <chris@travelamericas.com>)
List pgsql-sql
> Your problem is that NULL's are typed in PostgreSQL.
> 
> Try this:
> 
> SELECT NULL;
> SELECT NULL::BOOL;
> SELECT NULL::BOOL::TEXT;
> 
> to see what I mean.  This is an exact illustration of your problem.

Note that in 8.1 he will be able to do:
SELECT NULL::TEXT::INT::BOOL
and get the conversion he wants as long as he sticks to using 0 and 1 to
code for false and true.


pgsql-sql by date:

Previous
From: Havasvölgyi Ottó
Date:
Subject: Re: returning inserted id
Next
From: Tom Lane
Date:
Subject: Re: Unwanted nested dollar-quoted constants