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/