Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] (null) != (null) ?

From: Todd Vierling <tv(at)pobox(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] (null) != (null) ?
Date: 1999-10-26 15:50:10
Message-ID: Pine.NEB.4.10.9910261145270.26623-100000@server.int.duh.org (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, 26 Oct 1999, Tom Lane wrote:

: > => select * from foo2 where field not in (select field from foo);

: Well, it falls out of the semantics:  the NOT IN is true if foo2's
: field is not equal to *all* of the entries returned by the subselect.
: If one of those is NULL, then the result of the NOT IN can't be "true",
: it has to be "unknown",

In this case, I suppose I can produce another workaround:

select * from foo where field not in
  (select field from foo2 where field notnull);

which is more wordy, but seems to work as I want.

Thanks for the help!

-- 
-- Todd Vierling (tv(at)pobox(dot)com)


In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 1999-10-26 15:52:46
Subject: Re: [BUGS] (null) != (null) ?
Previous:From: Todd VierlingDate: 1999-10-26 14:41:52
Subject: Re: [BUGS] (null) != (null) ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group