On Mon, Mar 29, 2021 at 3:20 PM Adrian Klaver <adrian.kla...@aklaver.com> wrote:
> On 3/29/21 3:00 PM, Don Seiler wrote: > > > > I'm wondering if this is expected behavior that PG uses the > > dts_orders.order_id value in the subquery "select order_id from > > dts_temp" when dts_temp doesn't have its own order_id column. I would > > have expected an error that the column doesn't exist. Seems very > > counter-intuitive to think PG would use a column from a different table. > > See: > > > https://www.postgresql.org/message-id/pine.lnx.4.56.0308011345320....@krusty.credativ.de > > There is also an FAQ entry: https://wiki.postgresql.org/wiki/FAQ#Why_doesn.27t_PostgreSQL_report_a_column_not_found_error_when_using_the_wrong_name_in_a_subquery.3F David J.