From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | "Steve Atkins" <steve(at)blighty(dot)com> |
Cc: | "pgsql-general General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Auto incrementing primary keys |
Date: | 2008-02-18 19:29:07 |
Message-ID: | dcc563d10802181129u77132d0bj9d14b4ec3ce2c480@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Feb 18, 2008 12:16 PM, Steve Atkins <steve(at)blighty(dot)com> wrote:
>
> On Feb 18, 2008, at 9:56 AM, Raymond O'Donnell wrote:
>
> > 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.
>
> That's the maximum value for the sequence itself, but a "serial" is
> just an integer, so the 2^31-1 limit before wraparound still applies.
Look up bigserial
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-02-18 19:44:06 | Re: Initdb failed in PostgreSQL 7.3.21 |
Previous Message | Tom Lane | 2008-02-18 19:15:14 | Re: How to return a large String with C |