From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Sander Steffann <s.steffann@computel.nl>
Cc: operationsengineer1@yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Alternative to serial primary key
Date: Thu, 06 Jul 2006 16:51:33 -0500
Message-ID: <1152222693.13851.283.camel@state.g2switchworks.com> (raw)
In-Reply-To: <001b01c6a145$84e7ffd0$64c8a8c0@balefirehome>
References: <bf05e51c0607060902vdd8d993u470c128abf127d3d@mail.gmail.com>
<20060706183920.46008.qmail@web33314.mail.mud.yahoo.com>
<12b7ac1e0607061330o34adbd6ds9bd624d3889c7fe7@mail.gmail.com>
<001b01c6a145$84e7ffd0$64c8a8c0@balefirehome>
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.
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: smarlowe@g2switchworks.com, s.steffann@computel.nl, operationsengineer1@yahoo.com
Subject: Re: Alternative to serial primary key
In-Reply-To: <1152222693.13851.283.camel@state.g2switchworks.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