Re: Differentiate Between Zero-Length String and NULLColumn Values - Mailing list pgsql-sql

From D'Arcy J.M. Cain
Subject Re: Differentiate Between Zero-Length String and NULLColumn Values
Date
Msg-id 20070130113834.fa8d09e0.darcy@druid.net
Whole thread Raw
In response to Re: Differentiate Between Zero-Length String and NULLColumn Values  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: Differentiate Between Zero-Length String and NULLColumn Values
Re: Differentiate Between Zero-Length String and NULLColumn Values
List pgsql-sql
On Tue, 30 Jan 2007 09:23:32 -0500
Andrew Sullivan <ajs@crankycanuck.ca> wrote:
> Hmm.  Well, I'm not an Oracle guy, so I don't really know.  All I
> know is that we occasionally get people coming from Oracle who are
> surprised by this difference.  What I've been _told_ is that '' and
> NULL are under some circumstances (maybe integers?) the same thing,
> whereas of course ' ' and NULL are not.  But since I'm not an Oracle
> user, people should feel free to ignore me :)

I don't have an Oracle installation here and I haven't used it much but
I wonder if they treat the following two statements differently.
  SELECT * FROM table WHERE column IS NULL;  SELECT * FROM table WHERE column = NULL;

The latter violates the SQL spec and is not allowed by PostgreSQL
without setting a special flag.  Is it possible that Oracle accepts "="
against NULL and also treats it slightly differently?

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Linked Databases
Next
From: Andrew Sullivan
Date:
Subject: Re: Differentiate Between Zero-Length String and NULLColumn Values