Re: Weird procedure question - Mailing list pgsql-general

From Christopher Browne
Subject Re: Weird procedure question
Date
Msg-id CAFNqd5Uz6FZZm+QBrpZSi0HpL4FY-D=J=OwzSFDEd+B-+4g5gA@mail.gmail.com
Whole thread Raw
In response to Re: Weird procedure question  (digimer <lists@alteeve.ca>)
List pgsql-general


On Tue, Sep 25, 2018, 2:19 AM digimer <lists@alteeve.ca> wrote:

Oooooh, this is a very interesting approach! I didn't realize any UUIDs could be created in a predictable way. Thank you, this might be what I need.

Yep, DCE defined about 5 different versions of UUIDs, each with somewhat differing characteristics.


Versions 3 and 5 generate repeatable values, which is possibly what you are after.

1 and 2 used timestamp info plus node.  At one time MAC addresses were used as node info, but that seems to have fallen into disrepute.  (I think because it leaks network identifier info)

It's worth struggling through understanding them; the variations certainly are useful.

I think I have a function around to generate time-based UUIDs based on giving the timestamp as parameter; I'll see if I can dig that out.  That would allow writing up old history with UUIDs that look old.  Bug me off list if that sounds interesting.

pgsql-general by date:

Previous
From: digimer
Date:
Subject: Re: Weird procedure question
Next
From: r.zharkov@postgrespro.ru
Date:
Subject: Strange behavior of the random() function