Re: mysql's last_insert_id - Mailing list pgsql-general

From Bo Lorentsen
Subject Re: mysql's last_insert_id
Date
Msg-id 1062049686.1925.1408.camel@localhost
Whole thread Raw
In response to mysql's last_insert_id  (Michal Adamczakk <pokryfka@artland.com.pl>)
Responses Re: mysql's last_insert_id  (Dennis Björklund <db@zigo.dhs.org>)
List pgsql-general
On Fri, 2003-08-22 at 22:03, Michal Adamczakk wrote:

> how to implement mysql's last_insert_id() ?
You will be able to use the "PQoidValue" function that returns the last
inserted row oid, just after an insert command.

Then if you want the newly inserted row you do something like this
"SELECT * FROM table_name WHERE oid=42", where 42 is the oid number
returned from the "PQoidValue".

Now ... I know that its possible to omit the oid's from large tables,
and then this method will not work anymore. What to do in this case
still eludes me (Anyone ?) :-)

/BL


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: Replication Ideas
Next
From: Bo Lorentsen
Date:
Subject: Re: 7.4b1 vs 7.3.4 performance