Rules and triggers

From: "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Rules and triggers
Date: 2001-10-03 21:14:08
Message-ID: 025f01c14c50$5f5b5400$6e646464@New6.Travel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Richard Welty 2001-10-03 22:01:43 function/trigger questions
Previous Message Peter Eisentraut 2001-10-03 20:45:52 Re: make problems on Apple's new 10.1 os