Re: Drawbacks of using BYTEA for PK?

From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Drawbacks of using BYTEA for PK?
Date: 2004-01-12 15:52:49
Message-ID: 4002C2D1.7020202@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> writes:
>
>>Perhaps I can make a GUID by MD5( two random numbers || a timestamp || a
>>unique seed like MD5 of '/sbin/ifconfig' output)...
>
> Adding an MD5 hash contributes *absolutely zero*, except waste of space,
> to any attempt to make a GUID. The hash will add no uniqueness that was
> not there before.

Of course, in the above case, MD5 is used to compress the "uniqueness"
(which should be more than 128-bit, comprised of: a) [good] random
number; b) timestamp; c) a "node ID" element, either from /sbin/config
output which contain MAC address, or from the hash of harddisk content,
etc) into a 128-bit space.

--
dave

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melanie Bergeron 2004-01-12 15:59:58 unsubscribe
Previous Message Christopher Browne 2004-01-12 15:44:06 Re: no space left on device