Re: No error when FROM is missing in subquery - Mailing list pgsql-bugs

From Tom Lane
Subject Re: No error when FROM is missing in subquery
Date
Msg-id 15735.1166507302@sss.pgh.pa.us
Whole thread Raw
In response to Re: No error when FROM is missing in subquery  (mike <mike@thegodshalls.com>)
Responses Re: No error when FROM is missing in subquery  (mike <mike@thegodshalls.com>)
Re: No error when FROM is missing in subquery  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
mike <mike@thegodshalls.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

pgsql-bugs by date:

Previous
From: mike
Date:
Subject: Re: No error when FROM is missing in subquery
Next
From: Tom Lane
Date:
Subject: Re: BUG #2838: Compile error "tab-complete.c" on Mac OS X