Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DA6A5B5DBC0 for ; Thu, 16 Jun 2011 02:59:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 94235-03 for ; Thu, 16 Jun 2011 05:59:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 5288FB5D8BD for ; Thu, 16 Jun 2011 02:59:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p5G5xCuL019450; Thu, 16 Jun 2011 01:59:12 -0400 (EDT) To: Clem Dickey cc: pgsql-sql@postgresql.org Subject: Re: " ::= " grammar rule not accepted by Postgres In-reply-to: References: Comments: In-reply-to Clem Dickey message dated "Wed, 15 Jun 2011 14:50:09 -0700" Date: Thu, 16 Jun 2011 01:59:12 -0400 Message-ID: <19449.1308203952@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/59 X-Sequence-Number: 35525 Clem Dickey writes: > This expression is (I think) a well-formed query, but is rejected by > Postgresql 8.4 (t is a table name). > t t1 NATURAL JOIN t t2; Hmm ... I think you are looking at SQL92 or SQL99. The later versions of the spec don't seem to permit to be used that way. In particular, in SQL:2003 and SQL:2007 I don't see any derivation path from to . So while we possibly could support this, it's legacy syntax, and I doubt there's enough interest to bother. [ digs a bit more... ] Ah, here we are: Annex E of SQL:2003 calls out various incompatibilities from SQL:99, notably 6) In ISO/IEC 9075-2:1999, a , , or could consist of a . None of those three elements can consist of a in this edition of ISO/IEC 9075. regards, tom lane