Re: IN selection issues

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
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-23 23:41:45
Message-ID: Pine.LNX.4.44.0301240040510.789-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jérôme Calais writes:

> delete from status where status_id not in (select distinct status_id
> from company);
>
> "status_id" is a foreign key in "company".
>
> It does not delete any records from status table whereas it should
> because the sub query returns some records.

There are probably null values in the result set of the subselect.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Aaron Hillegass 2003-01-24 03:34:10 <security/pam_appl.h> should be <pam/pam_appl.h> on MacOS X
Previous Message pgsql-bugs 2003-01-23 21:45:18 Bug #883: explain analyze causes postgres to die