Re: Auto incrementing primary keys

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: rod(at)iol(dot)ie
Cc: pgsql_user <amaltasb(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Auto incrementing primary keys
Date: 2008-02-18 17:56:07
Message-ID: 47B9C6B7.5020609@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 18/02/2008 17:46, Raymond O'Donnell wrote:

> Well, that depends on your usage, so only you can answer that. According
> to the docs, "serial" creates an integer column, which will give you
> 2147483647 values - how quickly will you use that lot up? If you think
> you will run out, by all means use bigserial.

Actually, that isn't quite right - just looked at the docs for CREATE
SEQUENCE, and the default maximum value is 2^63-1.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2008-02-18 18:16:35 Re: Auto incrementing primary keys
Previous Message David Fetter 2008-02-18 17:55:30 Re: Initdb failed in PostgreSQL 7.3.21