Help with SPI and oids - Mailing list pgsql-hackers

From Adriaan Joubert
Subject Help with SPI and oids
Date
Msg-id 382F0ACD.81BE2A56@albourne.com
Whole thread Raw
List pgsql-hackers
Hi,
   I need to keep track of changes to a set of tables in a generic way.
To do this, I want to keep track of oid's. I'm writing the code using
the SPI interface, but I've hit the following problem: after I have
inserted a tuple into a table from the C routine, I cannot figure out
how to get hold of its oid. I had hope that there may be something in
SPI_tuptable, but there isn't. SPI_processed is 1, and the row is
inserted successfully. Surely there must be some way to get the oid of
the row that was just inserted.

I'd really appreciate any help on this one -- even digging aruond in the
backend code hasn't helped up to now.

Cheers!

Adriaan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] union problem version 6.5.3
Next
From: Mike Mascari
Date:
Subject: Postmaster dies with FATAL 1: ReleaseLruFile: No opened files - no one can be closed