From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: aburacze@gmail.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter
Date: Thu, 22 Mar 2012 12:53:01 -0500
Message-ID: <4F6B20AD02000025000465F5@gw.wicourts.gov> (raw)
In-Reply-To: <E1SAlxY-0008UU-A4@wrigleys.postgresql.org>
References: <E1SAlxY-0008UU-A4@wrigleys.postgresql.org>
<aburacze@gmail.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, aburacze@gmail.com
Subject: Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter
In-Reply-To: <4F6B20AD02000025000465F5@gw.wicourts.gov>
References: <E1SAlxY-0008UU-A4@wrigleys.postgresql.org> <4F6B20AD02000025000465F5@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox