Tracking SQLs that update data

From: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Tracking SQLs that update data
Date: 2010-06-14 23:55:09
Message-ID: AANLkTimmZQ9FEjeekKn9a1F6vyV4CdUPt5-xB5QHv205@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I'm having some issues with a code base where several different
programs are updating one "status" column in the DB with their code.
Mostly this is working, but in some cases the status column in a DB is
getting updated when it shouldn't have been, and we're trying to
locate which program did it.

While checking through all the code, I'm also wondering if it is
possible to somehow maintain a log of which SQL did the updating?

My question: how can I set up a "RULE" so that when a specific column
is updated, a separate table also logs which update SQL was issued?

Thanks for any ideas.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2010-06-15 00:26:05 Re: Unable to install pg in Win (MVR error)
Previous Message M. Bashir Al-Noimi 2010-06-14 23:33:40 Re: Unable to install pg in Win (MVR error)