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