X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 75BC5D7F04 for ; Wed, 7 Sep 2005 00:40:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77938-03 for ; Wed, 7 Sep 2005 03:40:13 +0000 (GMT) Received: from pd2mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by svr1.postgresql.org (Postfix) with ESMTP id 858E4D7F75 for ; Wed, 7 Sep 2005 00:40:12 -0300 (ADT) Received: from pd4mr6so.prod.shaw.ca (pd4mr6so-qfe3.prod.shaw.ca [10.0.141.69]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IMF008D3GUZM5A0@l-daemon> for pgsql-hackers@postgresql.org; Tue, 06 Sep 2005 21:40:11 -0600 (MDT) Received: from pn2ml1so.prod.shaw.ca ([10.0.121.145]) by pd4mr6so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IMF00GHMGUZNF80@pd4mr6so.prod.shaw.ca> for pgsql-hackers@postgresql.org; Tue, 06 Sep 2005 21:40:11 -0600 (MDT) Received: from [192.168.2.10] (S0106000f66d52c48.gv.shawcable.net [24.69.99.70]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0IMF00BAPGUYTI@l-daemon> for pgsql-hackers@postgresql.org; Tue, 06 Sep 2005 21:40:11 -0600 (MDT) Date: Tue, 06 Sep 2005 20:40:08 -0700 From: Paul Ramsey Subject: Re: uuid type for postgres In-reply-to: <20050906135057.GA24136@granicus.if.org> To: pgsql-hackers@postgresql.org Cc: Kevin Neufeld Message-id: <7CDBCE29-55BE-4EE3-8868-F50DB1E914F6@refractions.net> MIME-version: 1.0 (Apple Message framework v734) X-Mailer: Apple Mail (2.734) Content-type: text/plain; format=flowed; delsp=yes; charset=US-ASCII Content-transfer-encoding: 7bit References: <20050906135057.GA24136@granicus.if.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.12 required=5 tests=[DNS_FROM_AHBL_RHSBL=0.07, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/307 X-Sequence-Number: 72704 Just an FYI: We also ended up rolling our own uuid type, against libuuid. It seems that uuid is a widespread enough concept that implementors *will* be asked to support it, moderately often. We *could* roll our own (were capable), others are not so lucky, and would have to point out the lack of a uuid type as a limitation of pgsql. Which is too bad, given how relatively simple they are. That said: - linking against libuuid is fine for a contrib/ extension, but no good for a built-in type. A real uuid would have to do a proper independent implementation of uuid creation within pgsql. - we cannot snarf libuuid code, it is LGPL (though perhaps the author would re-license. if that is the *only* objection, it is well worth asking) I think having a built-in uuid type is something that a large number of people will use. Whether they use it will or badly is not our problem. It is possible to build crappy databases with all the types that already exist, adding uuid is hardly going to bring the walls down. Having uuid removes another excuse for people not doing a pgsql implementation. I am not sure if I heard clearly from the core team that a self- contained, BSD-licensed uuid would be accepted(able)? If so, I'll contact the libuuid author about a re-license (shortest path from A to B). P. On 6-Sep-05, at 6:50 AM, nathan wagner wrote: > > > I have been in need of a uuid type and ran across the pguuid download > by Xiongjian (Mike) Wang. This wasn't really useful to me for two > reasons: first, it is GPLed and I would prefer a more liberal license, > secondly, it didn't compile cleanly on Mac OS 10.3, due to lack of a > SIOCGETIFHWADDR (? i think, i can get the exact name if you want it) > ioctl() under darwin. > > While I could dike out the code that calls it, that seems like a > suboptimal > solution. So after a bit of poking around the interweb i ran across > Ralf Engelschall's ossp uuid library. This compiled with minimal > effort on mac os. Some reading, and an evening later, i've made > a server plugin with supporting SQL that implements an 'ossp_uuid' > type. > > Now i have four questions: > > 1: Is it feasible for this to be included in the contrib section of > the regular download? The uuid library is a "notice of copyright" > style > license, and I am willing to put my own code into the public domain. > > 2: Would just calling the type 'uuid' be better than 'ossp_uuid'? > It's > certainly a nicer name. > > 3: Would it be possible to include such a type as a postgres extension > to the usual SQL types. It seems to me that having an officially > supported type would be better than a user contributed type on the > grounds > that you could then rely on it being avaiable if postgres was. > In particular, installing it as an extension would require the > cooperation > of the DBA, which may be infeasible in some environments. > > -- > Nathan Wagner > > >