Re: Problems with outer joins in 7.1beta5 - Mailing list pgsql-general

From Tom Lane
Subject Re: Problems with outer joins in 7.1beta5
Date
Msg-id 25866.984772718@sss.pgh.pa.us
Whole thread Raw
In response to Problems with outer joins in 7.1beta5  (Barry Lind <barry@xythos.com>)
List pgsql-general
Barry Lind <barry@xythos.com> writes:
> What I would expect the syntax to be is:
> table as alias (columna as aliasa, columnb as aliasb,...)
> This will allow the query to work regardless of what the table column
> order is.  Generally the SQL spec has tried not to tie query behaviour
> to the table column order.

Unfortunately, the spec authors seem to have forgotten that basic design
rule when they wrote the aliasing syntax.  Column alias lists are
position-sensitive:

         <table reference> ::=
                <table name> [ [ AS ] <correlation name>
                    [ <left paren> <derived column list> <right paren> ] ]
              | <derived table> [ AS ] <correlation name>
                    [ <left paren> <derived column list> <right paren> ]
              | <joined table>

         <derived column list> ::= <column name list>

         <column name list> ::=
              <column name> [ { <comma> <column name> }... ]

SQL99 seems to be no better.  Sorry.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: create user, user exists
Next
From: Jan Wieck
Date:
Subject: Re: need hint for a trigger...