Search Postgresql Archives

Re: Large database design advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux