X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4BDFE9FB22A for ; Tue, 11 Jul 2006 23:40:09 -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 18229-01 for ; Tue, 11 Jul 2006 23:40:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by postgresql.org (Postfix) with ESMTP id 5754D9FB219 for ; Tue, 11 Jul 2006 23:40:05 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id s49so29930pyc for ; Tue, 11 Jul 2006 19:40:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eOgEFZqyaCeZKLTaCw38nNQflarVurePjg8fBv2T7oU0PGPhmME1EBIXZDxJFvEufKui/r0lYtabQG8CvAQZ8UOYEh35Dtol+ixJMmWiVFFnIu5ArnynLSPStCg60kst3rJiJWcEkvRu0mx9pXkm6vu/MHUhQsfs/E3T7TLO2CM= Received: by 10.35.78.9 with SMTP id f9mr303455pyl; Tue, 11 Jul 2006 19:40:03 -0700 (PDT) Received: by 10.35.62.5 with HTTP; Tue, 11 Jul 2006 19:40:03 -0700 (PDT) Message-ID: <866624ef0607111940v649632deoac11e1d9cc7669e@mail.gmail.com> Date: Tue, 11 Jul 2006 22:40:03 -0400 From: "Paul S" To: pgsql-admin@postgresql.org Subject: Re: Using GUIDs In-Reply-To: <5A7B5AFA-539E-490C-B080-34DF349D555B@pervasive.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3227_14900665.1152672003634" References: <449FE9AD.7010400@Spheron.com> <5A7B5AFA-539E-490C-B080-34DF349D555B@pervasive.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/73 X-Sequence-Number: 22319 ------=_Part_3227_14900665.1152672003634 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I have implemented GUID's in an application that needed them. We needed globally unique PK's and although Postgres did not offer them as a datatype, we used C# to perform that function. The Postgres database attribute ended up being a varchar(39). Not as performant as having Postgres natively do it but it works. :) The good thing is that the GUID is calculated before the insert into the database so it's actually using the middle tier's resources to compute it. (ok, it's a small amount but it's nice that the DB didn't have to pay that price) Paul On 6/27/06, Jim Nasby wrote: > > On Jun 26, 2006, at 9:05 AM, Dennis Wagner wrote: > > I'm currently thinking about using GUIDs as primary keys. > > Look on pgFoundry.org; I'm pretty sure there's some kind of UUID type > there. > -- > Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com > Pervasive Software http://pervasive.com work: 512-231-6117 > vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > ------=_Part_3227_14900665.1152672003634 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I have implemented GUID's in an application that needed them.  We needed globally unique PK's and although Postgres did not offer them as a datatype, we used C# to perform that function.  The Postgres database attribute ended up being a varchar(39).  Not as performant as having Postgres natively do it but it works. :)  The good thing is that the GUID is calculated before the insert into the database so it's actually using the middle tier's resources to compute it. (ok, it's a small amount but it's nice that the DB didn't have to pay that price) 
 
Paul
 
 


 
On 6/27/06, Jim Nasby <jnasby@pervasive.com> wrote:
On Jun 26, 2006, at 9:05 AM, Dennis Wagner wrote:
> I'm currently thinking about using GUIDs as primary keys.

Look on pgFoundry.org; I'm pretty sure there's some kind of UUID type
there.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software       http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@postgresql.org so that your
      message can get through to the mailing list cleanly

------=_Part_3227_14900665.1152672003634--