From: Chris Browne <cbbrowne@acm.org>
To: pgsql-sql@postgresql.org
Subject: Re: Alternative to serial primary key
Date: Fri, 07 Jul 2006 10:33:48 -0400
Message-ID: <60zmflscvn.fsf@dba2.int.libertyrms.com> (raw)
References: <bf05e51c0607060902vdd8d993u470c128abf127d3d@mail.gmail.com>
<20060706183920.46008.qmail@web33314.mail.mud.yahoo.com>
<12b7ac1e0607061330o34adbd6ds9bd624d3889c7fe7@mail.gmail.com>
<20060706171816.9f248316.darcy@druid.net>
darcy@druid.net ("D'Arcy J.M. Cain") writes:
> And even given all of that, I would probably still use serial.
>> and has been recommended. But having a hash function over the address
>> column as the primary key means I can always regenerate my primary key
>
> Danger, Will Robinson. The phrase "regenerate my primary key"
> immediately raises the hairs on the back of my neck. If the primary
> key can ever change, you have a broken schema.
Actually, I'd call it worse than that...
A schema is "merely" a technical detail.
The trouble is that if the primary key can ever change, then you have
a broken model for the data.
You can do "technical things" to fix problems with a schema; if the
data model is busted, then your schema is necessarily broken, in a way
that cannot be fixed.
--
(format nil "~S@~S" "cbbrowne" "ntlug.org")
http://cbbrowne.com/info/unix.html
MICROS~1 is to quality software what MacDonalds is to gourmet cooking
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cbbrowne@acm.org
Subject: Re: Alternative to serial primary key
In-Reply-To: <60zmflscvn.fsf@dba2.int.libertyrms.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox