Re: PostgreSQL Developer Best Practices

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Jerry Sievers <gsievers19(at)comcast(dot)net>, John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL Developer Best Practices
Date: 2015-08-26 00:56:56
Message-ID: CAKFQuwb99EjirBxFpgwOMi-3=tD95q99MuYvLVSm57e_0CJ0qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, August 25, 2015, Melvin Davidson <melvin6925(at)gmail(dot)com> wrote:
>
> Before ANYONE continues to insist that a serial id column is good,
> consider the case where the number of tuples will exceed a bigint.
> Don't say it cannot happen, because it can.
> However, if you have an alphanumeric field, let's say varchar 50, and it's
> guaranteed that it will never have a duplicate, then THAT is a natural
> primary
> key and beats the hell out of a generic "id" field.
>

Except for it being fatter. 400 bits wide instead of 64. But that, too,
is simply another consideration to evaluate.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2015-08-26 01:29:54 Re: BDR: cannot remove node from group
Previous Message Adrian Klaver 2015-08-26 00:32:24 Re: PostgreSQL Developer Best Practices