Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter

Поиск
Список
Период
Сортировка
Искать
От
Kevin Grittner
Тема
Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter
Дата
Msg-id
4F6B20AD02000025000465F5@gw.wicourts.gov
Ответ на
Список
Дерево обсуждения
BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter aburacze@gmail.com
Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter Adam Buraczewski <aburacze@gmail.com>
Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
 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
В списке pgsql-bugs по дате отправления
От: aburacze@gmail.com
Дата:
От: Tom Lane
Дата:
FAQ