X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C690952A2F for ; Fri, 1 Apr 2005 17:20:36 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78823-05 for ; Fri, 1 Apr 2005 16:20:28 +0000 (GMT) Received: from mail.99main.com (mail.99main.com [208.28.184.11]) by svr1.postgresql.org (Postfix) with ESMTP id D0F6253326 for ; Fri, 1 Apr 2005 17:20:26 +0100 (BST) Received: from 99main.com (localhost [127.0.0.1]) by mail.99main.com (8.12.8+Sun/8.12.8) with ESMTP id j31GKPc2003485 for ; Fri, 1 Apr 2005 11:20:25 -0500 (EST) From: "Keith Worthington" To: "PostgreSQL Perform" Reply-To: KeithW@narrowpathinc.com Subject: Triggers with FOR EACH STATEMENT Date: Fri, 1 Apr 2005 11:20:25 -0500 Message-Id: <20050401161901.M13616@narrowpathinc.com> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 68.235.22.242 (npkeithw) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/8 X-Sequence-Number: 11405 Hi All, I have a trigger function that copies data from an input table to a table in the actual data model. The data model table has a trigger after update on it. Is the first trigger fired after the copy terminates or after each insert? Is the second trigger fired after the first trigger is complete or once for every iteration of the loop in the first trigger? I only want these triggers to fire after the previous action is complete. That is what I thought I was getting when I chose the FOR EACH STATEMENT attribute. Here are excerpts from the various programs that are running. Your thoughts are appreciated.