BUG #5898: Nested "in" clauses hide bad column names - Mailing list pgsql-bugs

From Scott Dunbar
Subject BUG #5898: Nested "in" clauses hide bad column names
Date
Msg-id 201102221726.p1MHQPDh069580@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5898: Nested "in" clauses hide bad column names
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5898
Logged by:          Scott Dunbar
Email address:      scott@xigole.com
PostgreSQL version: 9.0.3
Operating system:   Ubuntu 10.10
Description:        Nested "in" clauses hide bad column names
Details:

I have a nested in clause like:

select respondent_id from respondent where respondent_id in (select
respondent_id from chat_session where project_id in (select project_id from
project where company_id = 4));

However, in this example, there is no column named respondent_id in the
chat_session table.  But the query runs and, indeed, returns all of the rows
in respondent.  Since this was then part of another nested in it deleted far
more that it was supposed to.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid
Next
From: Tom Lane
Date:
Subject: Re: BUG #5898: Nested "in" clauses hide bad column names