X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2B45B9FB1F0 for ; Wed, 23 Aug 2006 14:40:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 08851-08 for ; Wed, 23 Aug 2006 14:40:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A830C9FB1F4 for ; Wed, 23 Aug 2006 14:40:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7NHeG89022449; Wed, 23 Aug 2006 13:40:16 -0400 (EDT) To: Peter Eisentraut cc: pgsql-sql@postgresql.org, Daniel CAUNE Subject: Re: SQL92 compliance In-reply-to: <200608231811.48538.peter_e@gmx.net> References: <000301c6c655$0e3a0100$0b00a8c0@tedy> <200608231811.48538.peter_e@gmx.net> Comments: In-reply-to Peter Eisentraut message dated "Wed, 23 Aug 2006 18:11:47 +0200" Date: Wed, 23 Aug 2006 13:40:16 -0400 Message-ID: <22448.1156354816@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.154 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/165 X-Sequence-Number: 26123 Peter Eisentraut writes: > Am Mittwoch, 23. August 2006 03:40 schrieb Daniel CAUNE: >> Is AS in "SELECT my_column AS my_name FROM my_table" mandatory to be SQL92 >> compliant? > No. I have a patch at > > that fixes this at least for 7.4. I think it's a big stretch to say that that patch fixes it, since it only allows an AS-less target expression to be c_expr rather than a_expr as it ought to. The problem is really insoluble given that we allow user-defined postfix operators: is "SELECT x ~~ y" meant to be an infix operator with arguments x and y, or a postfix operator with argument x and a column label y? When this has come up in the past, we've always concluded that compliance with this not-very-well-thought-out detail of the spec is not worth the price of giving up postfix operators. Even if we were willing to do that, I think we'd also have to give up using bison to generate the parser :-( because some constructs would require more than one-token lookahead. regards, tom lane