X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 43C499FA5E1 for ; Fri, 2 Jun 2006 02:20:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 19877-02 for ; Fri, 2 Jun 2006 02:20:55 -0300 (ADT) X-Greylist: delayed 00:26:21.281729 by SQLgrey- Received: from kusanagi.sowebcorporation.com (kusanagi.sowebcorporation.com [69.16.226.44]) by postgresql.org (Postfix) with ESMTP id 3B7D09FA111 for ; Fri, 2 Jun 2006 02:20:55 -0300 (ADT) Received: from dsl-200-95-89-147.prod-infinitum.com.mx ([200.95.89.147]:52876 helo=[192.168.168.3]) by kusanagi.sowebcorporation.com with esmtpa (Exim 4.52) id 1Fm1g6-0003Ba-NW for pgsql-php@postgresql.org; Thu, 01 Jun 2006 23:54:30 -0500 Message-ID: <447FC484.3090301@soweb.com.mx> Date: Thu, 01 Jun 2006 23:54:28 -0500 From: Mario Medina User-Agent: Mozilla Thunderbird 1.0.6-7.5.20060mdk (X11/20050322) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: disabling triggers temporaly Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ClamAntiVirus-Scanner: This mail is clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - kusanagi.sowebcorporation.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - soweb.com.mx X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/2 X-Sequence-Number: 3527 Hi! does it exists any way to make that a trigger be disabled only for one insert and for other inserts not? I have a table, every insert,update or delete on it activates a trigger that do some tasks, but i wish that when i call special insert/update/delete on that table the trigger doesn't starts... The only way i think to do that is to start a transaction, delete the trigger, do the insert on the table, create the trigger again an commit the transaction..., and another is to make the trigger to check some value, and if that value is 1 the trigger works, if it is 0 the trigger doesn't, but i wish to know if it is a better way. Thank you.