From: Dávið Klein Sundsskarð <ds@neoconsult.dk>
To: pgsql-admin@postgresql.org
Subject: Log statements by username
Date: Tue, 06 Nov 2007 12:24:46 +0100
Message-ID: <47304EFE.2090808@neoconsult.dk> (raw)
Hi,
We have a database that is accessible to quite a few users. (Using their
own account name of course)
Our goal is to be able to log the users UPDATE statements, so that we
can track down changes that were not done by our application software.
Altering the log_statement parameter is not an option, since this
would generate enormous amounts of statements. I'm interested in certain
users only. (or in fact all but one user)
One approach i have tried is to create a RULE that filters queries from
the application software user out. It then updates a log table for every
update, but i am unable to get a hold of the actual query that is executing.
Any ideas?
Regards,
David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ds@neoconsult.dk
Subject: Re: Log statements by username
In-Reply-To: <47304EFE.2090808@neoconsult.dk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox