On Mon, 2006-09-18 at 09:21 +0200, Andreas Pflug wrote: > Gevik Babakhani wrote: > > - new_guid() function is supported. This function is based on V4 random > > uuid value. It generated 16 random bytes with uuid 'variant' and > > 'version'. It is not guaranteed to produce unique values > > Isn't guaranteed uniqueness the very attribute that's expected? AFAIK > there's a commonly accepted algorithm providing this. >
uniqueness is never a guaranteed. that is according to the RFC docs. However the new_guid() generates a random value in the range of 256^256. The random value is again based on the PG's randomizer which is a very good one. uniqueness is never a guaranteed in the sense that there is a tiny chance someone of the other side of the planet might generate the same guid. Or if you set your PC's clock back to the past (1981) you have a tiny chance to generate a same guid twice. I am running a test that is going on for the past two days, in has generated over 14 million guids with new_guid() and yet no duplicates :) Regards, Gevik > Regards, > Andreas > > ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings