Re: database design questions

From: Don Y <pgsql(at)DakotaCom(dot)Net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: database design questions
Date: 2006-04-03 16:36:15
Message-ID: 44314EFF.1070200@DakotaCom.Net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2006-04-03 16:38:01 Re: Getting more information about errorcodes such as when these error1 happen
Previous Message Vivek Khera 2006-04-03 16:33:23 Re: pg 8.1.2 performance issue