Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id CAB239FB905 for ; Tue, 24 Jul 2007 11:37:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 70416-03 for ; Tue, 24 Jul 2007 11:37:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sargon.lncsa.com (sargon.lncsa.com [212.99.8.251]) by postgresql.org (Postfix) with ESMTP id 738469FB591 for ; Tue, 24 Jul 2007 11:37:38 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by sargon.lncsa.com (Postfix) with ESMTP id 287683092B39 for ; Tue, 24 Jul 2007 16:37:36 +0200 (CEST) Received: from sargon.lncsa.com ([127.0.0.1]) by localhost (sargon.lncsa.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Owq+1a05g6kD for ; Tue, 24 Jul 2007 16:37:36 +0200 (CEST) Received: from zenon.apartia.fr (zenon.apartia.fr [10.0.3.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "zenon.apartia.fr", Issuer "ca.apartia.fr" (verified OK)) by sargon.lncsa.com (Postfix) with ESMTP id 0AA2B309F131 for ; Tue, 24 Jul 2007 16:37:36 +0200 (CEST) Received: from trajan.apartia.fr (trajan.apartia.fr [10.0.3.121]) by zenon.apartia.fr (Postfix) with ESMTP id 4CA91F0A253BF for ; Tue, 24 Jul 2007 16:37:35 +0200 (CEST) Received: by trajan.apartia.fr (Postfix, from userid 1000) id 869EB2524368; Tue, 24 Jul 2007 16:37:37 +0200 (CEST) Date: Tue, 24 Jul 2007 16:37:37 +0200 From: Louis-David Mitterrand To: pgsql-sql@postgresql.org Subject: inheriting a rule or a trigger? Message-ID: <20070724143737.GA25948@apartia.fr> Mail-Followup-To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/142 X-Sequence-Number: 28877 Hi, I'm trying to protect created_by and created_on columns from accidental update. Most of my tables inherit from a 'source' table that has those columns, so I was thinking of creating a rule or trigger that does nothing on update to these columns. But apparently rules and triggers don't apply to child tables. Is there another way to have the same effect, short of a rule/trigger on each table?