From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Harald Armin Massa <haraldarminmassa(at)gmail(dot)com> |
Cc: | Joe Kramer <cckramer(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Large database design advice |
Date: | 2006-08-24 17:16:05 |
Message-ID: | 20060824171605.GA30678@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-08-24 17:17:49 | Re: invalid byte sequence ? |
Previous Message | Alexander Farber | 2006-08-24 16:57:53 | Re: undefined reference to `PQprepare' with postgresql-dev 7.4.7-6sarge2 |