Re: silly NULL question - Mailing list pgsql-sql

From Rod Taylor
Subject Re: silly NULL question
Date
Msg-id 1059089115.90090.8.camel@jester
Whole thread Raw
In response to silly NULL question  (Dan Weeks <danimal@wildbrain.com>)
Responses Re: silly NULL question  (Dan Weeks <danimal@wildbrain.com>)
List pgsql-sql
> Would return the row.  Now with an upgrade to PostgreSQL 7.3 (yes, I know
> there are many changes and we're working through them right now) the same
> query returns nothing.  Dropping the "AND parent_id = NULL" returns the row
> as expected.

NULL is similar to UNKNOWN.

So, NULL = NULL is the similar to UNKNOWN = UNKNOWN.  Since you don't
know it, how can you tell if they're equal or not?

Syntax you're looking for is: AND parent_id IS NULL

If you really really really need = NULL (due to some MS product which
ignores SQL standards -- say MS Access) there is a toggle in the
postgresql.conf file to allow automated conversion of = NULL to IS NULL
within the server.


pgsql-sql by date:

Previous
From: Dan Weeks
Date:
Subject: silly NULL question
Next
From: Dan Weeks
Date:
Subject: Re: silly NULL question