pg_GetLastOid

pg_GetLastOid -- Returns the last object identifier

Description

int pg_getlastoid(int result_id);

pg_GetLastOid() can be used to retrieve the Oid assigned to an inserted tuple if the result identifier is used from the last command sent via pg_Exec() and was an SQL INSERT. This function will return a positive integer if there was a valid Oid. It will return -1 if an error occured or the last command sent via pg_Exec() was not an INSERT.