BUG #5898: Nested "in" clauses hide bad column names

From: "Scott Dunbar" <scott(at)xigole(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5898: Nested "in" clauses hide bad column names
Date: 2011-02-22 17:26:25
Message-ID: 201102221726.p1MHQPDh069580@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5898
Logged by: Scott Dunbar
Email address: scott(at)xigole(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-02-22 17:45:03 Re: BUG #5898: Nested "in" clauses hide bad column names
Previous Message Tom Lane 2011-02-22 16:54:30 Re: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid