Re: Alternative to serial primary key - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: Alternative to serial primary key
Date
Msg-id 20060706125141.GE26210@phlogiston.dyndns.org
Whole thread Raw
In response to Re: Alternative to serial primary key  ("David Clarke" <pigwin32@gmail.com>)
List 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@crankycanuck.ca
If they don't do anything, we don't need their acronym.    --Josh Hamilton, on the US FEMA


pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Alternative to serial primary key
Next
From: Chris Browne
Date:
Subject: Re: Alternative to serial primary key