Re: nullif('','') on insert

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Chris Travers <chris(at)travelamericas(dot)com>
Cc: "Matt L(dot)" <survivedsushi(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: nullif('','') on insert
Date: 2005-08-27 13:56:29
Message-ID: 20050827135629.GA1965@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-08-27 14:56:47 Re: Unwanted nested dollar-quoted constants
Previous Message Havasvölgyi Ottó 2005-08-27 12:53:32 Re: returning inserted id