Re: WIP: System Versioned Temporal Table - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Re: WIP: System Versioned Temporal Table
Date
Msg-id CALAY4q9MP=UidRj4caiTzXgjim9+5QOKimWnLc74w7SB7tP5uA@mail.gmail.com
Whole thread Raw
In response to Re: WIP: System Versioned Temporal Table  (Vik Fearing <vik.fearing@2ndquadrant.com>)
List pgsql-hackers


On Mon, Oct 28, 2019 at 6:36 PM Vik Fearing <vik.fearing@2ndquadrant.com> wrote:
On 28/10/2019 13:48, Surafel Temesgen wrote:
>
>
> On Fri, Oct 25, 2019 at 10:45 PM Vik Fearing
> <vik.fearing@2ndquadrant.com <mailto:vik.fearing@2ndquadrant.com>> wrote:
>
>     >
>     >     I don't understand what you mean by this.
>     >
>     >
>     >
>     > The primary purpose of adding row end time to primary key is to
>     allow
>     > duplicate value to be inserted into a table with keeping
>     constraint in
>     > current data but it can be duplicated in history data. Adding row
>     > start time column to primary key will eliminate this uniqueness for
>     > current data which is not correct  
>
>
>     How?  The primary/unique keys must always be unique at every point
>     in time.
>
>
> From user prospect it is acceptable to delete and reinsert a record
> with the same key value multiple time which means there will be
> multiple record with the same key value in a history data but there is
> only one values in current data as a table without system versioning
> do .I add row end time column to primary key to allow user supplied
> primary key values to be duplicated in history data which is acceptable
>

Yes, I understand that.  I'm saying you should also add the row start
time column.


that allow the same primary key value row to be insert as long
as insertion time is different
 
regards 
Surafel 

pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: WIP: System Versioned Temporal Table
Next
From: Amit Kapila
Date:
Subject: Re: parallel vacuum options/syntax