Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 287B2632854 for ; Wed, 26 May 2010 21:04:46 -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 02120-05 for ; Thu, 27 May 2010 00:04:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 17A22632523 for ; Wed, 26 May 2010 21:04:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o4R04YZc004885; Wed, 26 May 2010 20:04:34 -0400 (EDT) To: Ben Morrow cc: pgsql-sql@postgresql.org Subject: Re: Rules and sequences In-reply-to: <20100526181620.GA54996@osiris.mauzo.dyndns.org> References: <20100526181620.GA54996@osiris.mauzo.dyndns.org> Comments: In-reply-to Ben Morrow message dated "Wed, 26 May 2010 19:16:20 +0100" Date: Wed, 26 May 2010 20:04:34 -0400 Message-ID: <4884.1274918674@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/119 X-Sequence-Number: 34167 Ben Morrow writes: > I am trying to implement a fairly standard 'audit table' setup, but > using rules instead of triggers (since it should be more efficient). Rules are sufficiently tricky that I would never, ever rely on them for auditing. Use a simple AFTER trigger instead. regards, tom lane