Re: Re: Table name scope (was Re: [BUGS] Outer joins aren't working with views) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Re: Table name scope (was Re: [BUGS] Outer joins aren't working with views)
Date
Msg-id Pine.LNX.4.30.0012192347360.1000-100000@peter.localdomain
Whole thread Raw
In response to Re: Table name scope (was Re: [BUGS] Outer joins aren't working with views)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: Table name scope (was Re: [BUGS] Outer joins aren't working with views)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> SELECT * FROM (A NATURAL JOIN B) J        produces ID, CA, CB
>
> SELECT J.* FROM (A NATURAL JOIN B) J        produces ID, CA, CB
>
> SELECT A.* FROM (A NATURAL JOIN B) J        produces ID, CA
>
> SELECT B.* FROM (A NATURAL JOIN B) J        produces ID, CB

ISTM that correlation names aren't allowed after joined tables in the
first place.
        <table reference> ::=               <table name> [ [ AS ] <correlation name>                   [ <left paren>
<derivedcolumn list> <right paren> ] ]             | <derived table> [ AS ] <correlation name>                   [
<leftparen> <derived column list> <right paren> ]             | <joined table>
 
        <joined table> ::=               <cross join>             | <qualified join>             | <left paren> <joined
table><right paren>
 

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Mark Hollomon
Date:
Subject: Re: Manual changes for ALTER TABLE OWNER
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: heap page corruption not easy