Re: Alternative to serial primary key

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Alternative to serial primary key
Date: 2006-07-06 12:51:41
Message-ID: 20060706125141.GE26210@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jul 06, 2006 at 11:32:36PM +1200, David Clarke wrote:
>
> Yes, that occurred to me as well. Frankly I believe the md5 collision
> generation is more of a practical issue for crypto where for my
> purposes the potential for two residential street addresses to
> generate the same md5 hash value is effectively zero. And the md5
> function is a builtin which I would hope is faster than anything I
> could write in pgsql. Could be wrong, I have been before.

You could, of course, just put a unique index on it and accept that,
in the event of collision, you'll have to cope with the error. It's
probably an acceptable cheat, as you're right that the collision risk
is pretty small.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
If they don't do anything, we don't need their acronym.
--Josh Hamilton, on the US FEMA

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2006-07-06 14:41:52 Re: Alternative to serial primary key
Previous Message Andrew Sullivan 2006-07-06 12:50:35 Re: Alternative to serial primary key