Re: Historical Data Question - Mailing list pgsql-general

From Rodrigo De León
Subject Re: Historical Data Question
Date
Msg-id 1181854406.805516.187080@q19g2000prn.googlegroups.com
Whole thread Raw
List pgsql-general
On Jun 14, 12:57 pm, Lza <dayw...@gmail.com> wrote:
> Can anyone help me with this problem?
>
> I have a table in my database that holds information on policies and
> this table is linked to a number of other tables. I need to be able to
> keep a history of all changes to a policy over time. The other tables
> that are linked to policy also need to store historical data. When I
> run a query on the policy table for a certain period, I also need to
> be able to pull the correct related rows (i.e. the information that
> would have been in the table at that time) from the tables linked to
> it.
>
> Does anyone have any suggestions on how to store historical
> information in databases? Any good resources (books, etc..) that cover
> this information?
>
> Thanks for your time.

See: http://www.postgresql.org/docs/8.2/static/plpgsql-trigger.html

Search for: "Example 37-3. A PL/pgSQL Trigger Procedure For Auditing"


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore out of memory
Next
From: Tom Lane
Date:
Subject: Re: Hash Aggregate plan picked for very large table == out of memory