Re: Alternative to serial primary key

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Sander Steffann <s(dot)steffann(at)computel(dot)nl>
Cc: operationsengineer1(at)yahoo(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: Alternative to serial primary key
Date: 2006-07-06 21:51:33
Message-ID: 1152222693.13851.283.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 2006-07-06 at 16:45, Sander Steffann wrote:
> Hi,
>
> > But having a hash function over the address
> > column as the primary key means I can always regenerate my primary key
>
> Warning: don't attach a meaning to a primary key, as it might change

And as long as it has cascading updates and deletes it doesn't matter if
it changes. As long as it doesn't change into something that collides.

This is a religious topic, and there's advantages to both ways. But if
the field is and always must be unique and non-null, then there's no
reason to not use it as a primary key.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message operationsengineer1 2006-07-07 05:25:11 Re: Alternative to serial primary key
Previous Message Scott Marlowe 2006-07-06 21:50:07 Re: Alternative to serial primary key