Re: mysql's last_insert_id

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: Dennis Björklund <db(at)zigo(dot)dhs(dot)org>
Cc: Michal Adamczakk <pokryfka(at)artland(dot)com(dot)pl>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: mysql's last_insert_id
Date: 2003-08-28 12:52:57
Message-ID: 1062075176.1923.1446.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2003-08-28 13:01:34 Re: tsearch: how to get a list of stopwords?
Previous Message Sune Nielsen 2003-08-28 12:35:35 Problems with transactions and sequences