Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
Date
Msg-id 27528.1083896773@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Just a note for the hackers, Jonathan (I think :) ) talked to me about 
> this on the irc channel - we couldn't figure this one out.  Seems that 
> pg_dump produces NATURAL CROSS JOIN in the dump of a view, but the pgsql 
> grammar does not appear to allow it.

Hm.  The syntax NATURAL CROSS JOIN is specifically disallowed by SQL99
and our parser (see attached SQL99 excerpt).  If pg_dump produces that
in a view dump then that's a bug, but this test case doesn't let me see
it happen, because the parser rejects the given view definition.  Do
you happen to have the original input that created the view?
        regards, tom lane

        <joined table> ::=               <cross join>             | <qualified join>             | <natural join>
     | <union join>
 
        <cross join> ::=             <table reference> CROSS JOIN <table primary>
        <qualified join> ::=             <table reference> [ <join type> ] JOIN <table reference>                 <join
specification>
        <natural join> ::=             <table reference> NATURAL [ <join type> ] JOIN <table primary>
        ...
        <join type> ::=               INNER             | <outer join type> [ OUTER ]
        <outer join type> ::=               LEFT             | RIGHT             | FULL


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TABLE TODO items
Next
From: Jonathan Scott
Date:
Subject: Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN