Re: Can you run out of oids?

Поиск
Список
Период
Сортировка
Искать
От
Michael Fuhr
Тема
Re: Can you run out of oids?
Дата
Msg-id
20060801183617.GA99825@winnie.fuhr.org
Ответ на
Список
Дерево обсуждения
Can you run out of oids? "Chris Hoover" <revoohc@gmail.com>
Re: Can you run out of oids? Martijn van Oosterhout <kleptog@svana.org>
Re: Can you run out of oids? "Joshua D. Drake" <jd@commandprompt.com>
Re: Can you run out of oids? Michael Fuhr <mike@fuhr.org>
Re: Can you run out of oids? Tom Lane <tgl@sss.pgh.pa.us>
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 по дате отправления
От: Carlo Stonebanks
Дата:
Сообщение: Where do Tcl questions go?
От: Michael Fuhr
Дата:
Сообщение: Re: prepare, execute & oids
FAQ