Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5ND4-0001ug-3Z for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 22:20:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W5ND3-0005Gz-KG for pgsql-bugs@arkaria.postgresql.org; Mon, 20 Jan 2014 22:20:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5ND2-0005Gn-Ut for pgsql-bugs@postgresql.org; Mon, 20 Jan 2014 22:20:45 +0000 Received: from [87.118.86.135] (helo=mail.cybertec.at) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W5NCz-0007rr-Dk for pgsql-bugs@postgresql.org; Mon, 20 Jan 2014 22:20:44 +0000 Received: from localhost.localdomain (unknown [87.242.12.103]) by mail.cybertec.at (Postfix) with ESMTPSA id 92882390016C; Mon, 20 Jan 2014 22:20:22 +0000 (UTC) Message-ID: <52DDA126.8040003@pr.hu> Date: Mon, 20 Jan 2014 23:20:22 +0100 From: Boszormenyi Zoltan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tom Lane , herbert.grohmann@vallourec.com CC: pgsql-bugs@postgresql.org Subject: Re: BUG #8893: Precompiler ECPG doesn't check Var-List in Select corrrect. References: <20140120115411.26701.48100@wrigleys.postgresql.org> <14700.1390232209@sss.pgh.pa.us> In-Reply-To: <14700.1390232209@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 87.118.86.135 (deferred) X-Pg-Spam-Score: -1.1 (-) 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 2014-01-20 16:36 keltezéssel, Tom Lane írta: > 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. Still, this particular problem may be caught by the preprocessor. The SELECT targetlist is not "*", so the number of members for both the targetlist and the user structure (INTO :s_schichtsatz) are known. Best regards, Zoltán Böszörményi -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs