pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Medina <mario@soweb.com.mx>
To: pgsql-php@postgresql.org
Subject: disabling triggers temporaly
Date: Thu, 01 Jun 2006 23:54:28 -0500
Message-ID: <447FC484.3090301@soweb.com.mx> (raw)

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.






view thread (2+ messages)  latest in thread

Message-ID: <447FC484.3090301@soweb.com.mx>
Permalink:  ../447FC484.3090301@soweb.com.mx/
Also on:    postgresql.org/message-id/447FC484.3090301@soweb.com.mx

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: mario@soweb.com.mx
  Subject: Re: disabling triggers temporaly
  In-Reply-To: <447FC484.3090301@soweb.com.mx>
  References: <447FC484.3090301@soweb.com.mx>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox