pros/cons re constraints on audit tables

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: pros/cons re constraints on audit tables
Date: 2003-08-10 22:06:44
Message-ID: 20030811000644.C21726@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have been using everyones favourite implementation of
auditing by using triggers on insert, update and delete the
concept for which has been posted here time and again
(mine comes complete with a Python script to auto-generate
the needed triggers on marked tables - mail me if interested).

Every so often it has been said that the audit trail tables
should not bear any constraints. I have so far used "not null"
constraints in my audit trail tables on those attributes that
are constrained thusly in the audited source table. I have
marvelled back and forth on whether this is a good idea many
times but haven't come to a conclusion.

So, if anyone thinks this is a really dumb thing to do please
tell me. Rational arguments and examples for when this would
fail are highly welcome.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2003-08-10 22:25:45 Re: OT: Address Fields
Previous Message Raymond 2003-08-10 22:06:00 Concatenating String Literals in pgsql