Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id F1E13159078 for ; Mon, 5 Mar 2012 15:36:31 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S4dhu-00080K-QD for pgsql-bugs@postgresql.org; Mon, 05 Mar 2012 19:36:31 +0000 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 q25JaHW1024905; Mon, 5 Mar 2012 14:36:17 -0500 (EST) To: Pavel Stehule cc: pgsql-bugs@postgresql.org Subject: Re: plpgsql doesn't check a number of expressions and number of target variables correctly In-reply-to: References: Comments: In-reply-to Pavel Stehule message dated "Mon, 05 Mar 2012 20:13:03 +0100" Date: Mon, 05 Mar 2012 14:36:17 -0500 Message-ID: <24904.1330976177@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/36 X-Sequence-Number: 32597 Pavel Stehule writes: > Hello > I found a plpgsql bug: > create or replace function fx() > returns void as $$ > declare a int; b int; > begin > select 10,20 into a; > end; > $$ language plpgsql; > this is bug, or minimally potential source of strange behave. AFAICS this is intentional --- see the comment in exec_move_row. In any case, I think tightening it up is more likely to break working applications than do anything helpful. regards, tom lane