From: | Jim Nasby <jim(at)nasby(dot)net> |
---|---|
To: | Miroslav Šimulčík <simulcik(dot)miro(at)gmail(dot)com> |
Cc: | "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: temporal support patch |
Date: | 2012-05-29 23:52:25 |
Message-ID: | 4FC56139.4080304@nasby.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 inheritance might 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 results without it.
_sys_end should either be NULLable or if it's going to have a magic value that magic value should be "Infinity":
decibel(at)workbook(dot)local=# create table t(t timestamptz);
CREATE TABLE
decibel(at)workbook(dot)local=# insert into t values('infinity');
INSERT 0 1
decibel(at)workbook(dot)local=# select * from t;
t
----------
infinity
(1 row)
decibel(at)workbook(dot)local=#
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-05-30 00:19:31 | hash index concurrency |
Previous Message | Jeff Davis | 2012-05-29 23:41:53 | Re: Add primary key/unique constraint using prefix columns of an index |