Re: Can you run out of oids? - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Can you run out of oids?
Date
Msg-id 20060801183617.GA99825@winnie.fuhr.org
Whole thread Raw
In response to Can you run out of oids?  ("Chris Hoover" <revoohc@gmail.com>)
List pgsql-general
On Tue, Aug 01, 2006 at 02:02:18PM -0400, Chris Hoover wrote:
> Somewhat silly question, but is it possible to run out of OID's?

It depends on what you mean by "run out."  As the FAQ and documentation
mention, OIDs wrap around and aren't guaranteed to be unique.

http://www.postgresql.org/docs/faqs.FAQ.html#item4.12
http://www.postgresql.org/docs/8.1/interactive/datatype-oid.html
http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html

> Since we upgraded to 8.1.3, I noticed that I can create tables without an
> oid column.  I am wondering if I should consider trying to rebuild the
> existing tables to be built without OID.

Avoid using OIDs; if you need a unique identifier use a serial or
bigserial column.

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Carlo Stonebanks"
Date:
Subject: Where do Tcl questions go?
Next
From: Michael Fuhr
Date:
Subject: Re: prepare, execute & oids