Re: Large database design advice

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Large database design advice
Дата
Msg-id 20060824171605.GA30678@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Large database design advice  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
Список pgsql-general
On Thu, Aug 24, 2006 at 06:21:01PM +0200, Harald Armin Massa wrote:
> with a normal "serial", without "big", you can have
> 9.223.372.036.854.775.807 records individually numbered.

Not true; see the documentation:

http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE-SERIAL

"The type names serial and serial4 are equivalent: both create
integer columns.  The type names bigserial and serial8 work just
the same way, except that they create a bigint column.  bigserial
should be used if you anticipate the use of more than 2^31 identifiers
over the lifetime of the table."

I think you're confusing the size of the sequence (always 64 bits)
with the size of the column (32-bit integer for serial, 64-bit
bigint for bigserial) that will hold the sequence's value.

--
Michael Fuhr

В списке pgsql-general по дате отправления:

Предыдущее
От: "Alexander Farber"
Дата:
Сообщение: Re: undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: invalid byte sequence ?