From: | Nabil Sayegh <postgresql(at)e-trolley(dot)de> |
---|---|
To: | pgsql-novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | logging |
Date: | 2003-08-21 22:41:14 |
Message-ID: | 1061505673.10772.10.camel@billy |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi all,
for my next project I need to log everything that modifies the db.
I could do this in the database abstraction layer of my application but
that could be problematic:
e.g.:
INSERT INTO tab VALUES (now());
or
INSERT INTO tab VALUES (random());
or
DELETE FROM tab WHERE id_tab=round(random()*10);
1) Is there a way for me to see AFTER the query succeeded what exactly
has been done
e.g.
INSERT INTO tab VALUES (now());
becomes
INSERT INTO tab VALUES ('22.08.2003 00:36:41.887795 CEST');
OR
DELETE FROM tab WHERE id_tab=round(random()*10);
will become
DELETE FROM tab WHERE id_tab=3;
2) The other solution would be even nicer
Can postgresql do such a log itself ?
In the end I want to be able to start from the very beginning of the db
and redo everything step by step.
TIA
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Grant | 2003-08-22 00:56:29 | Re: one-to-one |
Previous Message | Nabil Sayegh | 2003-08-21 22:30:29 | logging |