Re: Large database design advice - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Large database design advice
Date
Msg-id 20060824171605.GA30678@winnie.fuhr.org
Whole thread Raw
In response to Re: Large database design advice  ("Harald Armin Massa" <haraldarminmassa@gmail.com>)
List 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 by date:

Previous
From: "Alexander Farber"
Date:
Subject: Re: undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2
Next
From: Tom Lane
Date:
Subject: Re: invalid byte sequence ?