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

From Bo Lorentsen
Subject Re: mysql's last_insert_id
Date
Msg-id 1062075176.1923.1446.camel@localhost
Whole thread Raw
In response to Re: mysql's last_insert_id  (Dennis Björklund <db@zigo.dhs.org>)
Responses Re: mysql's last_insert_id
List pgsql-general
On Thu, 2003-08-28 at 10:02, Dennis Björklund wrote:

> Yes, never use the oid at all is my suggestion.
Hmm, will oid's not change so that they are unique regardless, or will
oid be removed.

> If you need a unique id for a row then add a serial column that will
> provide that, and use currval('the_sequence') to get the last inserted
> value in that column for a session.
This is just not a general solution to this problem, and will need
awareness of the id type in the application layer.

/BL


pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: plpgsql FOUND Variable
Next
From: Oleg Bartunov
Date:
Subject: Re: tsearch: how to get a list of stopwords?