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)
Список pgsql-bugs
<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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: aburacze@gmail.com
Дата:
Сообщение: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6551: PL/pgSQL: GET DIAGNOSTICS not working for first OUT parameter