Re: execute incorect query and get data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marek Wróbel <mwrobel(at)icentrum(dot)pl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: execute incorect query and get data
Date: 2006-12-14 16:23:52
Message-ID: 21281.1166113432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?ISO-8859-2?Q?Marek_Wr=F3bel?= <mwrobel(at)icentrum(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zdenek Kotala 2006-12-14 17:02:30 Re: Compiling problem on Solaris
Previous Message Magnus Hagander 2006-12-14 13:41:38 Re: the bug report form doesn't accepts the email address