Re: Bug in PL/pgSQL GET DIAGNOSTICS?

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: Bug in PL/pgSQL GET DIAGNOSTICS?
Дата
Msg-id 013501c2742a$80549330$4201a8c0@beeblebrox
обсуждение исходный текст
Ответ на Re: PGXLOG variable worthwhile?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "Michael Paesold" <mpaesold@gmx.at> writes:
> > In a PL/pgSQL function I want to insert into a table and get the OID
back.
> > That usually works with
> > GET DIAGNOSTICS last_oid = RESULT_OID;
> > right after the insert statement.
>
> > But if the table that I insert to has a rule (or perhaps a trigger?)
that
> > updates another table, the RESULT_OID after the insert will be 0 (zero).
>
> As of CVS tip, this example produces the results I believe you want:
>
> regression=# SELECT pltestfunc(10);
> NOTICE:  RESULT_OID: 282229
> NOTICE:  RESULT_OID: 282230
> NOTICE:  RESULT_OID: 282231
...
[snip]

That is very good news. I appreciate that you got it fixed for 7.3. I am
sure I am only one of many who have use for that, but thanks anyway!

Best Regards,
Michael Paesold



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

Предыдущее
От: Daniel Kalchev
Дата:
Сообщение: DROP USER weirdness in 7.2.1
Следующее
От: Justin Clift
Дата:
Сообщение: French version of the PostgreSQL "Advocacy and Marketing" site is ready