Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 57F6C635E3B for ; Thu, 27 Aug 2009 14:25:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 33634-05 for ; Thu, 27 Aug 2009 17:25:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id D9ADD6350BF for ; Thu, 27 Aug 2009 14:25:05 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mgiie-00013q-Cr for pgsql-general@postgresql.org; Thu, 27 Aug 2009 19:25:04 +0200 Received: from frigga.summersault.com ([12.161.105.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2009 19:25:04 +0200 Received: from nate by frigga.summersault.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Aug 2009 19:25:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Nathaniel Smith Subject: Data audit trail techniques in postgresql Date: Thu, 27 Aug 2009 12:28:31 -0400 Organization: Summersault Lines: 26 Message-ID: <20090827122831.7a780cdb@gibson.summersault.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: frigga.summersault.com X-Newsreader: Claws Mail 3.7.2 (GTK+ 2.16.1; i486-pc-linux-gnu) Cc: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/1119 X-Sequence-Number: 152320 Howdy, (cross-posted to the pg.sql and pg.general lists) I'm looking to set up an audit trail system--ie, logging every INSERT/UPDATE/DELETE on a given table and tracking how the data changes over time. I know I could do it by hand using triggers, but was hoping to save a little time using something prepackaged. I installed and tested the two-year untouched http://pgfoundry.org/projects/audittrail2/ --the only auditing tool on pgFoundry with a release--and found that, while it works well, it's still marked as beta and has an obvious bug in it when used in 8.3.7. What do others use to accomplish this? Do most pg users just write triggers by hand? Or is there some nice auditing module that Google just isn't revealing to me? Thanks. Nathaniel Smith Web Application Developer Summersault, LLC. 710 E. Main St., Suite 200 Richmond, IN 47374 www.summersault.com