Received: from ajax2.sovam.com (ajax2.sovam.com [194.67.1.173]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f63KRia65471 for ; Tue, 3 Jul 2001 16:27:44 -0400 (EDT) (envelope-from dmitry@taurussoft.org) Received: from ts18-a491.dial.sovam.com ([195.239.6.237]:1062 "HELO taurussoft.org" ident: "TIMEDOUT2" whoson: "tttt@online.ru" smtp-auth: TLS-CIPHER: TLS-PEER: ) by ajax2.sovam.com with SMTP id ; Wed, 4 Jul 2001 00:27:22 +0400 Received: (qmail 1332 invoked from network); 3 Jul 2001 20:19:15 -0000 Received: from flame-in-night.taurussoft.org (HELO taurussoft.org) (192.168.107.1) by kitezh.taurussoft.org with SMTP; 3 Jul 2001 20:19:15 -0000 Message-ID: <3B4228CB.5060907@taurussoft.org> Date: Wed, 04 Jul 2001 00:19:23 +0400 From: "Dmitry G. Mastrukov" User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9) Gecko/20010505 X-Accept-Language: ru, en MIME-Version: 1.0 To: Peter Eisentraut CC: Alex Pilosov , pgsql-hackers@postgresql.org Subject: Re: Re: New data type: uniqueidentifier References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200107/58 X-Sequence-Number: 10763 Peter Eisentraut wrote: >Alex Pilosov writes: > >>Dmitry's stuff contains both datatype (uniqueidentifier), a function to >>generate a new object of that type (newid), and a set of functions to >>implement comparison operators for that type. >> >>I don't see anything wrong with that setup, but maybe I'm still missing >>something? >> > >It would be much simpler if you stored the unique id in varchar or text. > Are you sure varchar comparision will be quickly than current implementation? Next, varchar will need 36 byte, uniqueidentifier takes 16. Next, indexing - IMHO current stuff more suitable for indexes. Some time ago I saw some stuff which deals with uniqueidentifiers for Interbase. It uses your scheme with chars. But it strip "-" from string and reverts it to efficiently use indexes (uid sometimes uses MAC-address as part of itself, so MAC should go first in string). Weird scheme for me! regards, Dmitry