pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Dunbar <scott@xigole.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #5898: Nested "in" clauses hide bad column names
Date: Tue, 22 Feb 2011 17:26:25 GMT
Message-ID: <201102221726.p1MHQPDh069580@wwwmaster.postgresql.org> (raw)


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.



view thread (5+ messages)  latest in thread

Message-ID: <201102221726.p1MHQPDh069580@wwwmaster.postgresql.org>
Permalink:  ../201102221726.p1MHQPDh069580@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201102221726.p1MHQPDh069580@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: scott@xigole.com
  Subject: Re: BUG #5898: Nested "in" clauses hide bad column names
  In-Reply-To: <201102221726.p1MHQPDh069580@wwwmaster.postgresql.org>
  References: <201102221726.p1MHQPDh069580@wwwmaster.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox