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>)
Список 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 по дате отправления:

Предыдущее
От: "Carlo Stonebanks"
Дата:
Сообщение: Where do Tcl questions go?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: prepare, execute & oids