Rules and triggers - Mailing list pgsql-general

From Mihai Gheorghiu
Subject Rules and triggers
Date
Msg-id 025f01c14c50$5f5b5400$6e646464@New6.Travel
Whole thread Raw
List pgsql-general
I have a table with check type constrains. On this table there are rules
that affect other tables.
What is the order in which TRIGGER BEFORE UPDATE, TRIGGER AFTER UPDATE and
RULE are run?
If the new record is rejected due to the check constraints, can I be sure
that the rule is not executed?
I need two rules: one that is executed for all records, and another one that
is executed only if one of the fields is set to a specific value. Can I be
sure that both rules are executed, if applicable?
If I need an UPDATE to a table to also INSERT records into two other tables,
do I need two rules, or can I do it with only one rule, and how?
Thank you all.


pgsql-general by date:

Previous
From: "Seung-won Hwang"
Date:
Subject: Fw: Questions on 'Copy from' and functional indicies
Next
From: "Seung-won Hwang"
Date:
Subject: Flushing cache?