Re: Database Design: Maintain Audit Trail of Changes

From: Wolfgang Keller <feliphil(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Database Design: Maintain Audit Trail of Changes
Date: 2013-01-08 15:20:07
Message-ID: 20130108162007.89b280fef253133e9a605947@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> For several reasons (including operational and legal) once data are
> entered in a table they cannot be changed or deleted without an audit
> trail of the change, when it occurred, who made the change, and the
> reason for it.

Besides the need for storing additional information that the user who
modifies the data may be required to enter manually, couldn't the
function of simply tracking what was inserted, updated and deleted be
implemented by an "eternal" transaction log that never gets purged, but
regularly archived in partitions, PGP-signed (with a qualified key) if
required to prove authenticity?

After all, PostgreSQL maintains this automatically anyway, so why not
use it?

TIA,

Sincerely,

Wolfgang

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Keller 2013-01-08 15:20:58 Query with LIMIT but as random result set?
Previous Message Graeme Hinchliffe 2013-01-08 15:10:03 Using composite types within PLPGSQL Function