Re: Advice for generalizing trigger functions - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Advice for generalizing trigger functions
Date
Msg-id 321939.8466.qm@web31804.mail.mud.yahoo.com
Whole thread Raw
In response to Re: Advice for generalizing trigger functions  (chester c young <chestercyoung@yahoo.com>)
List pgsql-sql
--- On Wed, 12/26/07, chester c young <chestercyoung@yahoo.com> wrote:

> what I do for change log is to have one change log table with table_id
> and column_id attributes that refer by to my internal meta_table and
> meta_column tables.  this always works and is in the end, I have found,
> a bit more flexible, allowing you to search for changed columns, for
> example.

I agree that EAV history tables are far more flexible than creating separate history tables for each base table.
Especiallysince this design choice does not require modifications when tables are created, altered, or dropped.
However,I was looking to utilize functionality that an EAV history table can't provide.
 

For example, I replace joins to the Project.Managers table with joins to the History.Managers table and with a
timestampof interest to reproduce query results of the database's state that existed in "times passed".
 

If I didn't need to regularly provide this functionality, I would certainly use an EAV history table.

Regards,
Richard Broersma Jr.


pgsql-sql by date:

Previous
From: "A. Wiryawan"
Date:
Subject: need help
Next
From: Richard Broersma Jr
Date:
Subject: Re: need help