pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRules/Triggers executio order
2+ messages / 2 participants
[nested] [flat]
* Rules/Triggers executio order
@ 2006-10-19 00:42 Benjamin Krajmalnik <kraj@illumen.com>
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Krajmalnik @ 2006-10-19 00:42 UTC (permalink / raw)
To: pgsql-admin
I have a partitioned table to which I route data using a trigger.
I am changing it to use a set of rules which executes "INSTEAD" on
insert.
The parent table currently has a trigger.
The system is a live system. I would prefer to not have to suspend the
data flow.
If I create the rules, and given the fact that they execute "INSTEAD" of
the insertion into the parent table, will the trigger still execute.
I will be removing the trigger immediately after the creation of the
rules, but just want to be safe and make sure I get no duplicate
entries.
Thanks in advance.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Rules/Triggers executio order
@ 2006-10-19 04:27 Jim C. Nasby <jim@nasby.net>
parent: Benjamin Krajmalnik <kraj@illumen.com>
0 siblings, 0 replies; 2+ messages in thread
From: Jim C. Nasby @ 2006-10-19 04:27 UTC (permalink / raw)
To: Benjamin Krajmalnik <kraj@illumen.com>; +Cc: pgsql-admin
On Wed, Oct 18, 2006 at 06:42:21PM -0600, Benjamin Krajmalnik wrote:
> I have a partitioned table to which I route data using a trigger.
> I am changing it to use a set of rules which executes "INSTEAD" on
> insert.
> The parent table currently has a trigger.
>
> The system is a live system. I would prefer to not have to suspend the
> data flow.
> If I create the rules, and given the fact that they execute "INSTEAD" of
> the insertion into the parent table, will the trigger still execute.
> I will be removing the trigger immediately after the creation of the
> rules, but just want to be safe and make sure I get no duplicate
> entries.
An INSTEAD OF rule replaces the query that you originally had with the
one re-written by the rule, so no, the triggers shouldn't fire. But you
should test to make sure.
--
Jim Nasby jim@nasby.net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-10-19 04:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19 00:42 Rules/Triggers executio order Benjamin Krajmalnik <kraj@illumen.com>
2006-10-19 04:27 ` Jim C. Nasby <jim@nasby.net>
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