Re: IN selection issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jérôme Calais <jerome(dot)calais(at)arunix(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: IN selection issues
Date: 2003-01-24 04:00:34
Message-ID: 9958.1043380834@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?ISO-8859-1?Q?J=E9r=F4me?= Calais <jerome(dot)calais(at)arunix(dot)fr> writes:
> I am encountering problems with IN selections.
> I am trying this query :
> delete from status where status_id not in (select distinct status_id
> from company);

I'll bet the sub-select yields some NULL rows? If so, this is not a
bug. NOT IN is not very intuitive about handling of NULLs. I suggest
you consult a SQL textbook ...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-01-24 05:28:23 Re: Bug #883: explain analyze causes postgres to die
Previous Message Aaron Hillegass 2003-01-24 03:34:10 <security/pam_appl.h> should be <pam/pam_appl.h> on MacOS X