Re: Weird procedure question

Поиск
Список
Период
Сортировка
От James Keener
Тема Re: Weird procedure question
Дата
Msg-id CAG8g3tzZA1my8f-0jyW5rJayS3pDdZ0PsPao2TRviAJ2S27xVw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Weird procedure question  (digimer <lists@alteeve.ca>)
Ответы Re: Weird procedure question
Список pgsql-general
v3 UUIDs are basically MD5 hashes (v5 is sha1?). So for the same input you'll always get the same hash.

I had assumed the modified time would be the same; if that's not, then I'm not sure and my gut tells me this becomes A Really Hard Problem™.

Jim

On Tue, Sep 25, 2018 at 1:38 AM digimer <lists@alteeve.ca> wrote:
On 2018-09-25 1:33 a.m., James Keener wrote:
> Do you need a single field for the pk or can you just make it the
> (original_table_pk, modified_time)? Alternatively, you could generate
> a uuid v3 from the (original_table_pk, modified_time) using something
> like uuid_generate_v3(uuid_nil(), original_table_pk || ":" ||
> modified_time)?

I need to preset the modified_time, I can't use now() or else the value
would differ between databases. Also, unless I am missing something,
uuid_generate_v3() would generate a different UUID per trigger of the
procedure, so I'd end up with different history_uuids on each database
that I ran the query against.

If I am missing something (and entirely possible I am), please hit me
with a clue stick. :)

digimer

В списке pgsql-general по дате отправления:

Предыдущее
От: digimer
Дата:
Сообщение: Re: Weird procedure question
Следующее
От: James Keener
Дата:
Сообщение: Re: Weird procedure question