capturing and storing query statement with rules - Mailing list pgsql-general

From Andrew Gould
Subject capturing and storing query statement with rules
Date
Msg-id 20030624201739.77120.qmail@web13403.mail.yahoo.com
Whole thread Raw
Responses Re: capturing and storing query statement with rules  (Guillaume LELARGE <gleu@wanadoo.fr>)
Re: capturing and storing query statement with rules  (Mike Benoit <mikeb@netnation.com>)
List pgsql-general
I would like to create a audit log of update and
delete queries against a table.  I want the log on the
server side, since access will be done using various
clients via ODBC.  I would like to capture the user,
current datetime and the query statement.  My thought
was to accomplish this by creating a rule that will
insert the information into a log table.

How can I captures the query statement so that I can
place it in a insert query?  Is there a variable in
the server that holds the query statement as a string?

Am I about to go in over my head (again)?

Thanks,

Andrew

pgsql-general by date:

Previous
From: "Daniel E. Fisher"
Date:
Subject: 7.3.3 install under way
Next
From: Andrew Gould
Date:
Subject: pg_dumping schemes (not schema)