getting the oid for a new tuple in a BEFORE trigger - Mailing list pgsql-general

From Markus Wagner
Subject getting the oid for a new tuple in a BEFORE trigger
Date
Msg-id 01082911150802.01558@jumbo
Whole thread Raw
List pgsql-general
Hi,

we need to control database changes within BEFORE triggers.
There is no problem with triggers called by update, but there is
a problem with triggers called by insert.

We strongly need to know the oid of a newly inserted tuple. In this case, we
use tg_newtuple of the TriggerData structure passed to thetrigger function,
and its t_data -> t_oid will have the value '0'.

Using BEFORE and AFTER triggers would make our lives much harder.

Is there any way (even hack) to get the oid the newly inserted tuple will
receive?

Thank you very much,

Markus


pgsql-general by date:

Previous
From: "SCUBi"
Date:
Subject: ODBC crashes WebShere Studio and Visual Studio
Next
From: "Mike Arace"
Date:
Subject: Deployment of PostgreSQL Applications