Re: No error reported when field in subselect is not part of

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: No error reported when field in subselect is not part of
Date: 2003-01-27 19:47:19
Message-ID: 20030127114610.H80308-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 27 Jan 2003, Jean-Luc Lachance wrote:

> There is no error reported when a field in the subselect is not part of
> the subselect table
> but exists in the main table.
>
> Try This:
>
> nsd=# create table a ( f1 int, f2 text);
> CREATE
> nsd=# create table b ( f3 int, f4 text);
> CREATE
> nsd=# select * from a where f1 in ( select f1 from b);
> f1 | f2
> ----+----
> (0 rows)

That's because f1 is taken as an outer reference. I think
that's the expected/correct behavior.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2003-01-27 20:06:22 Re: No migration path for MONEY
Previous Message Jean-Luc Lachance 2003-01-27 19:42:36 No error reported when field in subselect is not part of the table but exists in the main table.