X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8C5029FA43C for ; Thu, 6 Jul 2006 09:51:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 51983-05 for ; Thu, 6 Jul 2006 09:51:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id D61909FA0EC for ; Thu, 6 Jul 2006 09:51:47 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1FyTS6-0004wg-8M for pgsql-sql@postgresql.org; Thu, 06 Jul 2006 08:59:30 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 222A34172; Thu, 6 Jul 2006 08:51:41 -0400 (EDT) Date: Thu, 6 Jul 2006 08:51:41 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Alternative to serial primary key Message-ID: <20060706125141.GE26210@phlogiston.dyndns.org> References: <12b7ac1e0607060316ub7b5e21i5e8e3bef2504e02c@mail.gmail.com> <44ACEA1C.9030804@logix-tt.com> <12b7ac1e0607060406r16d03f74mfa303eec9ab4821f@mail.gmail.com> <44ACEFBF.7030903@logix-tt.com> <20060706111223.GC26210@phlogiston.dyndns.org> <12b7ac1e0607060432i5fd3aa4ap16af10b9efabb917@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12b7ac1e0607060432i5fd3aa4ap16af10b9efabb917@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/62 X-Sequence-Number: 25636 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