pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Chris Travers <chris@travelamericas.com>
Cc: Matt L. <survivedsushi@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: nullif('','') on insert
Date: Sat, 27 Aug 2005 08:56:29 -0500
Message-ID: <20050827135629.GA1965@wolff.to> (raw)
In-Reply-To: <43100C05.7020309@travelamericas.com>
References: <20050821014023.92296.qmail@web35209.mail.mud.yahoo.com>
	<43100C05.7020309@travelamericas.com>

> 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.



view thread (3+ messages)

Message-ID: <20050827135629.GA1965@wolff.to>
Permalink:  ../20050827135629.GA1965@wolff.to/
Also on:    postgresql.org/message-id/20050827135629.GA1965@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, chris@travelamericas.com, survivedsushi@yahoo.com
  Subject: Re: nullif('','') on insert
  In-Reply-To: <20050827135629.GA1965@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox