Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4F6D32E0280 for ; Tue, 12 Feb 2008 14:15:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 57111-01-10 for ; Tue, 12 Feb 2008 14:15:22 -0400 (AST) Received: from starfish.geekisp.com (mail.geekisp.com [216.168.135.169]) by postgresql.org (Postfix) with ESMTP id 3DD162E0278 for ; Tue, 12 Feb 2008 14:15:30 -0400 (AST) Received: (qmail 1307 invoked by uid 1003); 12 Feb 2008 18:17:03 -0000 Received: from adsl-76-200-128-65.dsl.pltn13.sbcglobal.net (HELO dino-1.misuse.org) (public@misuse.org@76.200.128.65) by mail.geekisp.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 12 Feb 2008 18:17:03 -0000 X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Tue, 12 Feb 2008 10:11:39 -0800 To: pgsql-sql@postgresql.org From: Steve Midgley Subject: Re: Usage of UUID with 8.3 (Windows) In-Reply-To: <20080212172037.DEA542C9C87@maia-2.hub.org> References: <20080212172037.DEA542C9C87@maia-2.hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Message-Id: <20080212181530.3DD162E0278@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/95 X-Sequence-Number: 30186 At 09:20 AM 2/12/2008, pgsql-sql-owner@postgresql.org wrote: >Date: Mon, 11 Feb 2008 11:56:33 -0500 >From: Tom Lane >To: ncode@gmx.com >Cc: pgsql-sql@postgresql.org >Subject: Re: Usage of UUID with 8.3 (Windows) >Message-ID: <2916.1202748993@sss.pgh.pa.us> > >ncode@gmx.com writes: > > Now, what do I have to do in order to generate a valid UUID (or the > 5 different versions as implemented by the RFC) under Windows? > >Figure out how to build ossp-uuid on Windows ... > > regards, tom lane You can review this thread too. MS provides native WinAPI tools and language wrappers for this job: http://answers.google.com/answers/threadview?id=553194 Here's the specific API call, which could possibly be wrapped inside PG - however that raises the problem Tom notes about "boatloads of platform specific code" -- I'd guess that a custom written stored procedure is the way to go? Not sure how to make WinAPI calls from PG - perhaps someone on list has experience or references for that: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidcreate.asp HTH, Steve