Re: No error when FROM is missing in subquery

From: mike <mike(at)thegodshalls(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Thomas H(dot)" <me(at)alternize(dot)com>, Jaime Casanova <systemguards(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: No error when FROM is missing in subquery
Date: 2006-12-19 07:12:48
Message-ID: 1166512368.17069.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

You are right as usual.... My apologies yet again. I have wrongly
assumed that the lower statement would run first since it is enclosed in
parenthesis.

On Tue, 2006-12-19 at 00:48 -0500, Tom Lane wrote:
> mike <mike(at)thegodshalls(dot)com> writes:
> > Pgsql does not throw an error (at least prior to 8.2) if the column
> > referenced by the select statement for the IN clause does not exist.
>
> My, there's a lot of misinformation in this thread.
>
> The reason there's no error thrown is that the reference to mov_id in
> the sub-SELECT is a perfectly legal outer reference to the mov_id column
> available from the upper SELECT. If the column truly did not exist
> anywhere in the tables used in the query, it would have thrown an error.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Macdonald 2006-12-19 15:17:56 BUG #2842: Installation procedure
Previous Message Tom Lane 2006-12-19 06:29:44 Re: BUG #2838: Compile error "tab-complete.c" on Mac OS X