Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5B7EA4248 for ; Thu, 22 Mar 2012 14:53:18 -0300 (ADT) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SAmCL-0001VH-Op for pgsql-bugs@postgresql.org; Thu, 22 Mar 2012 17:53:18 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 22 Mar 2012 12:53:05 -0500 Message-Id: <4F6B20AD02000025000465F5@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Thu, 22 Mar 2012 12:53:01 -0500 From: "Kevin Grittner" To: , Subject: Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201203/163 X-Sequence-Number: 32724 wrote: > x1 | x2 | x3 > ----+----+---- > | 1 | 1 To reduce the ambiguity about what value is coming from where, I slightly modified the script before testing it against a recent HEAD build: create table t (c integer); create function p(out x1 integer, out x2 integer, out x3 integer) as $$ begin insert into t values (1),(2); get diagnostics x1 = row_count; insert into t values (3),(4),(5); get diagnostics x2 = row_count; insert into t values (6),(7),(8),(9),(10); get diagnostics x3 = row_count; end; $$ language plpgsql; select * from p(); I got this: x1 | x2 | x3 ----+----+---- | 3 | 5 (1 row) -Kevin