On Feb 25, 2008, at 2:33 PM, Geoffrey wrote:
We are still in a pickle with trying to resolve our trigger issues
without affecting slony triggers.
The point is, we need to be able to disable triggers, check
constraints, and foreign-key constraints without affecting slony
triggers in certa
We are still in a pickle with trying to resolve our trigger issues
without affecting slony triggers.
The point is, we need to be able to disable triggers, check constraints,
and foreign-key constraints without affecting slony triggers in certain
situations.
This is all running on 7.4.19, thu
Mark Borins wrote:
I am creating a system where I have a trigger on three different
tables. There is a particular Boolean field in each of these tables
that when it is set in table it should be set the same in the other two.
So I figured I could put a trigger on each table that when the Bool
That looks like a good solution.
And that way it won't cascade.
Thanks
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Richard Huxton
Sent: May 11, 2005 11:53 AM
To: Mark Borins
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Disabling Tri
Mark Borins wrote:
I am creating a system where I have a trigger on three different tables.
There is a particular Boolean field in each of these tables that when it is
set in table it should be set the same in the other two.
Just make sure you only check the boolean value too:
-- Trigger on table a
"Mark Borins" <[EMAIL PROTECTED]> writes:
> Does anyone know if it is possible to run an update statement on a table and
> for only that statement disable the trigger on the table?
No, but why fire the update if not needed? Make the trigger do
something like
UPDATE foo SET boolcol = true
From: Franco Bruno Borghesi [mailto:[EMAIL PROTECTED]
Sent: May 11, 2005 11:24 AM
To: Mark Borins
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Disabling Triggers
You could add a TIMESTAMP field on the three tables (lets call it
last_change), and modify your
You could add a TIMESTAMP field on the three tables (lets call it last_change), and modify your triggers to update this value every time a row is updated.
Then your trigger should update the boolean fields with the boolean
value of the row with the max(last_change) in the three tables, only if the
I am creating a system where I have a trigger on
three different tables. There is a particular Boolean field in each of
these tables that when it is set in table it should be set the same in the
other two.
So I figured I could put a trigger on each table that
when the Boolean field was
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
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 i
[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 logging
>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 :
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 NUL
>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 add
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
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 wel
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:
>
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 tra
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 c
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 and
21 matches
Mail list logo