Subject: time travel

From: Giles Nelson <[email-masked]>
Date: Wed, 09 Nov 1994 13:57:59 +0000

Hello all.

I have a query about the facilities POSTGRES gives for historical databases,
what the user manual terms as `time travel'.

Classes can be created to be archival or not. The default is not. Therefore
after instances are deleted, purged and the database vacuumed those instances
will have been physically deleted.

Alternatively a class may be defined as archival. Even after vacuuming
therefore deleted instances are still accessible.

The time stamp that POSTGRES appears to attach to each instance is what is
often termed `database time', that is the time at which the instance was
actually inserted into the database.

I would like to use the built-in facilities that POSTGRES has for time travel
but I wish to time stamp each instance with an `event time', that is the time
which is associated with the instance itself, such as a birth date.

My impression is that this is not possible and I will have to use a time
attribute within a relation. However I wondered if anyone else had experience
of doing directly and therefore retaining the use of built-in facilities.

Giles Nelson.

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Wed, 09 Nov 94 10:50:36 -0800

Giles Nelson <[email-masked]> writes:
> I would like to use the built-in facilities that POSTGRES has for
> time travel but I wish to time stamp each instance with an `event
> time', that is the time which is associated with the instance
> itself, such as a birth date.
> 
> My impression is that this is not possible and I will have to use a
> time attribute within a relation.

correct, the built-in time-travel syntax only works for transaction
commit time, and you cannot change the commit timestamp.  the time
*types* are general but the syntax is not.
--
  Paul M. Aoki          |  University of California at Berkeley
  [email-masked]  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776