From: | "Michael Paesold" <mpaesold(at)gmx(dot)at> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bug in PL/pgSQL GET DIAGNOSTICS? |
Date: | 2002-10-15 09:08:58 |
Message-ID: | 013501c2742a$80549330$4201a8c0@beeblebrox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Michael Paesold" <mpaesold(at)gmx(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Clift | 2002-10-15 09:33:10 | French version of the PostgreSQL "Advocacy and Marketing" site is ready |
Previous Message | Daniel Kalchev | 2002-10-15 08:04:07 | DROP USER weirdness in 7.2.1 |