Bruce Momjian wrote:
Geoffrey wrote:
Terry Lee Tucker wrote:
Tom,
Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the column,
reltriggers, is permanent fixture in pg_class? What is your advice on this?
I just got this rather wild idea, don't really have the opportunity to
think it through thoroughly right now...
Say, you create a table with a set of triggers that have some method of
checking whether triggers should be enabled in this session, and
containing some stubs where actual trigger
Net Virtual Mailing Lists wrote:
All I did was added an extra column to my table (I called it
batch_process). Then in
the trigger do something like (in whichever function you are calling):
IF NEW.batch_update IS NOT NULL AND NEW.batch_update = ''t'' THEN
NEW.batch_process := NULL;
RETURN
Net Virtual Mailing Lists wrote:
All I did was added an extra column to my table (I called it
batch_process). Then in
the trigger do something like (in whichever function you are calling):
IF NEW.batch_update IS NOT NULL AND NEW.batch_update = ''t'' THEN
NEW.batch_process := NULL;
[Here's my third attempt to post this. Sorry if it's a dup. (trip?)]
If you're willing to modify your triggers you can gain per-session
control over any and all triggers and functions.
For example, suppose I have a trigger that logs certain events, but I
also want to be able to turn off
Geoffrey wrote:
Terry Lee Tucker wrote:
Tom,
Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the
column,
reltriggers, is permanent fixture in pg_class? What is your advice on
this?
It is the only known way to control triggers though it isn't regularly
tested by the developers.
I think I've come up with another way.. I posted this recently, but did
not get any feedback on it so I'm not sure how dumb it is... It is
working really great for me though
All I did was
This caught my eye the other day, but didn't take the time to examine it. I
find that I am now very interested in it. Could you please elaborate on your
method and how this works?
TIA
On Sunday 27 February 2005 05:37 pm, Jay Guerette saith:
If I disable INSERT and UPDATE triggers inside a
Tom,
Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the column,
reltriggers, is permanent fixture in pg_class? What is your advice on this?
TIA
On Monday 28 February 2005 03:22 pm, Tom Lane saith:
Terry Lee Tucker wrote:
Tom,
Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the column,
reltriggers, is permanent fixture in pg_class? What is your advice on this?
I'd be quite interested in this as
If I disable INSERT and UPDATE triggers inside a transaction; by
setting and resetting reltriggers in pg_class; am I correct in
thinking that this will disable triggers globally for that table for
the duration of that transaction? So an INSERT or UPDATE to this
table, outside of the transaction
Jay Guerette [EMAIL PROTECTED] writes:
If I disable INSERT and UPDATE triggers inside a transaction; by
setting and resetting reltriggers in pg_class; am I correct in
thinking that this will disable triggers globally for that table for
the duration of that transaction?
Not if you never commit
12 matches
Mail list logo