Re: Weird procedure question - Mailing list pgsql-general

From digimer
Subject Re: Weird procedure question
Date
Msg-id cf63c1e5-671a-7f7f-2411-8eef964c3a33@alteeve.ca
Whole thread Raw
In response to Re: Weird procedure question  (James Keener <jim@jimkeener.com>)
Responses Re: Weird procedure question  (James Keener <jim@jimkeener.com>)
List pgsql-general
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 by date:

Previous
From: James Keener
Date:
Subject: Re: Weird procedure question
Next
From: James Keener
Date:
Subject: Re: Weird procedure question