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 B4E089FA6A2 for ; Fri, 7 Jul 2006 04:37:20 -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 36596-04 for ; Fri, 7 Jul 2006 04:37:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by postgresql.org (Postfix) with ESMTP id 4B3609FA634 for ; Fri, 7 Jul 2006 04:37:17 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so2987205ugf for ; Fri, 07 Jul 2006 00:37:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MsFBFopKuIWgIoOe1gUcd/biwwiPtnBHO4jqzxmUDgrqUnUNREw0eWr0/RnyBzlisp928kUTH5nDU3J7bUTb3AjxTxHe+9QtXLWNPVItp4vaiLRAqETnTNcNNXT+McbBRLt5E27CNFVzTSnRlizj01nSGcXY9XAryCM6IfmZZLY= Received: by 10.67.89.5 with SMTP id r5mr1658511ugl; Fri, 07 Jul 2006 00:37:15 -0700 (PDT) Received: by 10.67.23.14 with HTTP; Fri, 7 Jul 2006 00:37:15 -0700 (PDT) Message-ID: <12b7ac1e0607070037p4c2a94d4r8e6758be7b08ca95@mail.gmail.com> Date: Fri, 7 Jul 2006 19:37:15 +1200 From: "David Clarke" To: "D'Arcy J.M. Cain" Subject: Re: Alternative to serial primary key Cc: operationsengineer1@yahoo.com, postgresql@aranya.com, pgsql-sql@postgresql.org In-Reply-To: <20060706171816.9f248316.darcy@druid.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060706183920.46008.qmail@web33314.mail.mud.yahoo.com> <12b7ac1e0607061330o34adbd6ds9bd624d3889c7fe7@mail.gmail.com> <20060706171816.9f248316.darcy@druid.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/80 X-Sequence-Number: 25654 On 7/7/06, D'Arcy J.M. Cain wrote: > Are you sure? I have a hard time imagining a situation where that Absolutely. > Also, you need to get into a lot more coding to handle the fact that > "521 Main Avenue" is the same address as "521 Main Av." and "521 Main > Ave" and even "521 Main." Actually that is being done for me and you're correct, it is a lot of effort but there are a variety of services out there and I'm not trying to reinvent the wheel. > And even given all of that, I would probably still use serial. Because? > 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. Perhaps my choice of words was somewhat hasty. A serial is totally divorced from the data it represents whereas a md5 hash is (for my purposes) unique, stable, verifiable, and simple. Dave