Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 259942E0260 for ; Thu, 13 Dec 2007 11:59:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 06123-09 for ; Thu, 13 Dec 2007 11:59:33 -0400 (AST) Received: from smtp03.itc.nl (smtp03.itc.nl [192.87.16.13]) by postgresql.org (Postfix) with ESMTP id 6A1EC2E024C for ; Thu, 13 Dec 2007 11:59:33 -0400 (AST) Received: from itcnt08.itc.nl (Not Verified[172.16.2.8]) by smtp03.itc.nl with MailMarshal (v6, 2, 2, 3503) id ; Thu, 13 Dec 2007 16:59:31 +0100 Received: from [172.16.31.48] ([172.16.31.48]) by itcnt08.itc.nl with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Dec 2007 16:59:28 +0100 Message-ID: <476156EF.8080901@itc.nl> Date: Thu, 13 Dec 2007 16:59:43 +0100 From: "Rolf A. de By" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Trigger definition . . . puzzled References: <4760DCED.7080805@itc.nl> <12289.1197560972@sss.pgh.pa.us> In-Reply-To: <12289.1197560972@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Dec 2007 15:59:28.0898 (UTC) FILETIME=[245A3620:01C83DA1] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/79 X-Sequence-Number: 29771 Thanks Tom, Yes, this is an inheritance set-up. But actually no: I am executing all my data changes against the parent table, and want the trigger on that parent table to fire for an insert on the parent table as it does. But I also want the trigger to fire when an update on the parent table is executed, and this does not happen. Rolf Tom Lane wrote: > "Rolf A. de By" writes: > >> Thanks for that. There is some misunderstanding here. For this example, >> I had taken the sting out of my trigger function and turned it into a >> much more concise no-op, with warnings. The actual code of my original >> trigger function is irrelevant. The no-op trigger function displays the >> same strange behaviour: it works as expected for INSERTs, but not for >> UPDATEs. The update goes through! And it shouldn't. >> > > Reading between the lines, I gather you have an inheritance setup and > are expecting a trigger on the parent table to fire for events occurring > in the child tables. Doesn't work like that; you need to put triggers > on the child tables. > > regards, tom lane > -- dr ir Rolf A. de By assoc prof Geodata Management and Engineering dept Geoinformation Processing ITC -- International Institute for Geo-information Science & Earth Observation Hengelosestraat 99 7500 AA Enschede, The Netherlands ph +31 53 4874553 fx +31 53 4874335 email deby@itc.nl