From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | anony <anony(at)dslextreme(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: feature idea – automatic up |
Date: | 2004-05-21 10:47:12 |
Message-ID: | 40ADDE30.5080006@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
anony wrote:
> Maybe this feature is already out there.
> I guess you could write triggers to do some of this.
>
> Often when designing a database I add a start_date and end_date column
> to the table. The start_date is when the record was created and the
> end_date is when the record expired. For UPDATES, I populate the
> end_date and INSERT a new record. This allows you to track changes
> though out time.
You probably want to read up on "Temporal Databases" which is what
you're talking about. I believe there is a book by C.J.Date on the topic
as it relates to relational DBs.
From a curiosity point of view, there apparently used to be a
"time-travel" feature in (really) old versions of PG. MVCC effectively
creates a new row for every update anyway, so you could "rewind" to
previous transaction IDs to see the data then.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Witney | 2004-05-21 10:48:14 | Re: Web DB Management tool |
Previous Message | Richard Huxton | 2004-05-21 10:43:37 | Re: Problem with public schema |