Skip site navigation (1) Skip section navigation (2)

Re: Re: New data type: uniqueidentifier

From: "Dmitry G(dot) Mastrukov" <dmitry(at)taurussoft(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alex Pilosov <alex(at)pilosoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: New data type: uniqueidentifier
Date: 2001-07-03 20:19:23
Message-ID: 3B4228CB.5060907@taurussoft.org (view raw or flat)
Thread:
Lists: pgsql-hackers
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



In response to

pgsql-hackers by date

Next:From: Alex PilosovDate: 2001-07-03 20:26:38
Subject: Re: funny (cache (?)) bug in postgres (7.x tested)
Previous:From: Nathan MyersDate: 2001-07-03 20:17:40
Subject: Re: Re: Backup and Recovery

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group