Re: Drawbacks of using BYTEA for PK? - Mailing list pgsql-general

From David Garamond
Subject Re: Drawbacks of using BYTEA for PK?
Date
Msg-id 4002C2D1.7020202@zara.6.isreserved.com
Whole thread Raw
In response to Re: Drawbacks of using BYTEA for PK?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Drawbacks of using BYTEA for PK?
List pgsql-general
Tom Lane wrote:
> David Garamond <lists@zara.6.isreserved.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


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: int8 version of NUMERIC?
Next
From: Melanie Bergeron
Date:
Subject: unsubscribe