Re: Is it possible to disable insert/update/delete triggers for one transaction and not another?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Karen Hill <karen_hill22(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is it possible to disable insert/update/delete triggers for one transaction and not another?
Date: 2006-06-30 23:52:48
Message-ID: 20060630235248.GQ17241@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 28, 2006 at 11:59:36AM -0700, Karen Hill wrote:
> I have an insert/update/delete trigger on all my tables which add data
> to a log table.
>
> I would like to be able to disable them when the tables are called from
> one stored proceedure I have. Yet I would still like those triggers to
> fire on any other operation that is happening concurrently. Is this
> even possible?

Best bet would be to have the procedure only execute as a given user
(probably via security definer) and detect that in the trigger.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-07-01 00:13:31 Re: Notes on converting from MySQL 5.0.x to PostgreSQL
Previous Message Scott Marlowe 2006-06-30 22:16:46 Re: Notes on converting from MySQL 5.0.x to PostgreSQL