Re: [HACKERS] what standard say ... - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject Re: [HACKERS] what standard say ...
Date
Msg-id 34DAC06A.C8E9729@sable.krasnoyarsk.su
Whole thread Raw
In response to what standard say ...  ("Vadim B. Mikheev" <vadim@sable.krasnoyarsk.su>)
List pgsql-hackers
Thomas G. Lockhart wrote:
>
> > vac=> select count(*) from test where exists (select t1.y from test t1 where t1.y = x);
> >                                                                                     ^
> > Is this correlated subquery or not ?
> > (Note, that I don't use x with t1. prefix here)
> > With current parser this works as un-correlated subquery...
>
> >From "The SQL Standard", 3rd ed., Date and Darwen:
>
> "... each unqualified column name is _implicitly_ qualified by a range variable name
> defined (explicitly or implicitly) in the nearest applicable FROM clause." (the emphasis
> is from the book, not me)
>
> It goes on to recommend reading the standard for full understanding, but it is pretty
> clear that your interpretation is correct; in the example above x is implicitly equivalent
> to t1.x.

Ok. Nice to know that we are correct here :)

Vadim

pgsql-hackers by date:

Previous
From: Julia Anne Case
Date:
Subject: [BUG?] Frontend Protocol...
Next
From: Zeugswetter Andreas DBT
Date:
Subject: AW: [HACKERS] Re: atttypmod of 0