Re: temporal support patch - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: temporal support patch
Date
Msg-id 4FC56139.4080304@nasby.net
Whole thread Raw
In response to Re: temporal support patch  (Miroslav Šimulčík <simulcik.miro@gmail.com>)
Responses Re: temporal support patch
List pgsql-hackers
On 5/18/12 2:06 AM, Miroslav Šimulčík wrote:
> - no data redundancy - in my extension current versions of entries are stored only once in original table (in
table_log- entries are inserted to both original and log table) 

That's not necessarily a benefit... it makes querying for both history *and* current data a lot more complex. Table
inheritancemight be an elegant solution to that, but I doubt you could just bolt that on top of what you've created. 

The timestamp fields need to have timezone info. If you change the timezone for a connection you will get inconsistent
resultswithout it. 

_sys_end should either be NULLable or if it's going to have a magic value that magic value should be "Infinity":

decibel@workbook.local=# create table t(t timestamptz);
CREATE TABLE
decibel@workbook.local=# insert into t values('infinity');
INSERT 0 1
decibel@workbook.local=# select * from t;    t
---------- infinity
(1 row)

decibel@workbook.local=#
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Add primary key/unique constraint using prefix columns of an index
Next
From: Robert Haas
Date:
Subject: hash index concurrency