Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5GuD-0002h5-Th for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 15:36:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W5GuD-0006u1-E5 for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 15:36:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5GuC-0006tv-RP for pgsql-bugs@postgresql.org; Mon, 20 Jan 2014 15:36:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5GuA-00008l-3e for pgsql-bugs@postgresql.org; Mon, 20 Jan 2014 15:36:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s0KFanjm014701; Mon, 20 Jan 2014 10:36:49 -0500 From: Tom Lane To: herbert.grohmann@vallourec.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8893: Precompiler ECPG doesn't check Var-List in Select corrrect. In-reply-to: <20140120115411.26701.48100@wrigleys.postgresql.org> References: <20140120115411.26701.48100@wrigleys.postgresql.org> Comments: In-reply-to herbert.grohmann@vallourec.com message dated "Mon, 20 Jan 2014 11:54:11 +0000" Date: Mon, 20 Jan 2014 10:36:49 -0500 Message-ID: <14700.1390232209@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org herbert.grohmann@vallourec.com writes: > EXEC SQL SELECT > ... > sugru_1,sugru_2,sugru_3,sugru_4,sugru_5,sugru_6,sugru_7,sugru_8,sugru_9 > stoerzeit_a11,stoerzeit_a12,stoerzeit_a13,stoerzeit_a14,stoerzeit_a15,stoerzeit_a16 > ... > Missing Komma after sugru_9 does not produce a Compiler Error! Unfortunately, that's legal SQL syntax: stoerzeit_a11 is taken as a column alias for sugru_9, even without AS in front of it. This might not be the single worst syntax choice the SQL standards committee ever made, but it's certainly in the running for that distinction. Unfortunately, we're pretty much stuck with it :-( --- even if we didn't want to follow the standard as best we can, there is a whole lot of SQL code out there that depends on being able to omit AS. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs