Re: Is this a bug or a feature? Column visibility in subquery from outer query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Paolo Saul <paolo(dot)saul(at)telogis(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is this a bug or a feature? Column visibility in subquery from outer query
Date: 2009-05-18 14:27:57
Message-ID: 29685.1242656877@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Paolo Saul <paolo(dot)saul(at)telogis(dot)com> writes:
> I just want to point out that the sub-query is using a column from the outer
> query (eg. x1) without an alias from the table in the outer query.

This behavior is required by the SQL standard. It's called an outer
reference.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-18 15:39:02 Re: pg_dump and 2gb limit on windows and version 8.1.3
Previous Message Scara Maccai 2009-05-18 13:49:30 referring to calculated column in sub select