From: | "Clark C (dot) Evans" <clark(dot)evans(at)manhattanproject(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Interaction Record (Journal Table?) |
Date: | 2001-08-26 18:04:04 |
Message-ID: | 20010826140404.B16703@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
----- End forwarded message -----
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Lauko | 2001-08-26 18:44:28 | Re: problems on solaris 7 |
Previous Message | Clark C . Evans | 2001-08-26 17:57:59 | Interaction Record (Journal Table?) |