Re: database design questions - Mailing list pgsql-general

From Don Y
Subject Re: database design questions
Date
Msg-id 44314EFF.1070200@DakotaCom.Net
Whole thread Raw
In response to database design questions  (Ottavio Campana <ottavio@campana.vi.it>)
List pgsql-general
Alban Hertroys wrote:
> Ottavio Campana wrote:
>>>   CREATE TABLE person (
>>>       id   SERIAL,
>>>       name TEXT
>>>   );
>
>> how can I do it with a INT8 instead of a INT4?
>
> Do you really expect that sequence to reach over 2 billion? Otherwise
> I'd stick with the SERIAL, nothing wrong with that unless you're selling

Depends on what the dynamics of his design are.  I.e. if he frequently
creates and deletes "people", then he can consume a lot of "id-space"
even though there aren't many real people in the database itself.

Personally, I doubt this is the case.  But, can see other applications
where this could be true.  Since you can't reuse old id's, it's easier
to just use a bigger size datum than having to worry how the database
will react when/if you run out of them!

> electrons seperately or something like that (hmm... how much are they? I
> sure could use a few extra).

Three for a quark...  keep the charge!  [sic] :>

--don


pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: pg 8.1.2 performance issue
Next
From: "Thomas F. O'Connell"
Date:
Subject: Re: pgpool ABORT + no transaction warning