pros/cons re constraints on audit tables - Mailing list pgsql-general

From Karsten Hilbert
Subject pros/cons re constraints on audit tables
Date
Msg-id 20030811000644.C21726@hermes.hilbert.loc
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: OT: Address Fields
Next
From: Raymond
Date:
Subject: Email DML Errors and Constraint Violations