Skip site navigation (1) Skip section navigation (2)

Re: Does INSERT inserts always at the end ?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Florence HENRY <florence(dot)henry(at)obspm(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Does INSERT inserts always at the end ?
Date: 2004-05-31 22:04:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Tue, May 25, 2004 at 01:15:14AM -0700, Florence HENRY wrote:
> Indeed, I'm using Perl's DBI. currval does exactly what I want. Thanks to 
> all who pointed it to me.

That's the way it should be done.

> Before I could read your messages, I made a workaround that worked nice also, 
> but could you tell me if it would always work ?
> It uses the "oid" number. I've read that it used to be unique, but within
> the same session, I can assume that it is always growing, can't I ?

NO! The OID will wrap eventually, it is not guarenteed to be unique.
And you can now make tables without OIDs.
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

pgsql-general by date

Next:From: Martijn van OosterhoutDate: 2004-05-31 22:10:03
Subject: Re: statement level triggers in PostgreSQL , anybody??
Previous:From: Oliver ElphickDate: 2004-05-31 21:33:01
Subject: Re: Poatgresql database on more than one disk

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group