Re: execute incorect query and get data - Mailing list pgsql-bugs

From Tom Lane
Subject Re: execute incorect query and get data
Date
Msg-id 21281.1166113432@sss.pgh.pa.us
Whole thread Raw
In response to execute incorect query and get data  (Marek Wróbel <mwrobel@icentrum.pl>)
Responses Re: execute incorect query and get data  (Marek Wróbel <mwrobel@icentrum.pl>)
List pgsql-bugs
Marek Wróbel <mwrobel@icentrum.pl> writes:
> create table a (a1 integer);
> create table b (b1 integer);
> insert into a (a1) values (1);
> insert into a (a1) values (2);
> select a1 from b;
> ERROR:  column "a1" does not exist at character 8
> but :
> select a1 from a where a1 not in (select a1 from b);

This is not a bug, it's an outer reference.  Read any SQL book ...
        regards, tom lane


pgsql-bugs by date:

Previous
From: Marek Wróbel
Date:
Subject: execute incorect query and get data
Next
From: Zdenek Kotala
Date:
Subject: Re: Compiling problem on Solaris