From: | "Wojciech Tylek" <wat(at)wat(dot)net(dot)pl> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4250: subquery in query |
Date: | 2008-06-17 20:37:24 |
Message-ID: | 200806172037.m5HKbObv080240@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: 4250
Logged by: Wojciech Tylek
Email address: wat(at)wat(dot)net(dot)pl
PostgreSQL version: 8.1,8.2,8.3
Operating system: Linux
Description: subquery in query
Details:
There are two example tables:
create table a (
a_id serial primary key,
sth varchar
-- anything else
);
create table b (
b_id serial primary key,
a_id int references a(a_id),
sth int
--anything else
);
The question is:
Why the query like:
select * from b where a_id in (select a_id from a where b_id in (10,20));
does not return error?
The table "a" does not have b_id!
And for example a query (which is a subquery in above): select a_id from a
where b_id in (10,20);
returns ERROR: column "b_id" does not exist.
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2008-06-17 21:55:54 | Re: BUG #4250: subquery in query |
Previous Message | Tom Lane | 2008-06-17 17:47:13 | Re: BUG #4247: (Possible) SQL miscontruct not flagged |