Interaction Record (Journal Table?)

From: "Clark C (dot) Evans" <cce(at)clarkevans(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Interaction Record (Journal Table?)
Date: 2001-08-26 17:57:59
Message-ID: 20010826135759.A16703@doublegemini.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I was thinking that for the application I'm
working on, it'd be nice to have a journal
(as an XML fragment) which describes the
interactions within the database...

<insert table="person">
<id>3493</id>
<given>Clark</given>
<family>Evans</family>
</insert>
<update table="person" id="3493">
<middle>Cameron</middle>
</update>
<delete table="person" id=3493" />

I was wondering if anyone has done
something similar? If so, what
approach did you use and is it
published as a reuseable module?

If not... how would you go about
approaching this? I suppose it could
all fit in a "journal" table using
arrays?

JOURNAL has 6 columns:
action, target_table, where_columns, where_values, columns, values

INSERT INTO JOURNAL VALUES ('insert','person'
,NULL,NULL,
['id','given','family'],[3493,'Clark','Evans']);
INSERT INTO JOURNAL VALUES ('update','person',
['id'], [3439],
['middle'],['Cameron']);
INSERT INTO JOURNAL VALUES ('delete','person',
['id'],[3439],
NULL,NULL);

I guess this would be better in the spirit of
PostgreSQL... in this way one can easily make
the dump of the SQL above...

Thoughts?

Clark

Browse pgsql-general by date

  From Date Subject
Next Message Clark C . Evans 2001-08-26 18:04:04 Interaction Record (Journal Table?)
Previous Message Sam Tregar 2001-08-26 17:51:53 Re: MySQL's (false?) claims... (was: Re: PL/java?)