We have verified this problem under both 7.3.2 and the CVS tip.
The attached example is far simpler than the actual code in our
application, but may nevertheless benefit from some explanation. We
have several tables with two ON INSERT rules:
[TABLE policy_accounts]
|
Brandon Craig Rhodes [EMAIL PROTECTED] writes:
The `working' test case omits the
AND (account, policy) NOT IN
(SELECT account, policy FROM policy_accounts_active)
condition from the end of executor_active, which magically makes the
executor_hamlet rule start firing as it should.
I
Tom Lane [EMAIL PROTECTED] writes:
Brandon Craig Rhodes [EMAIL PROTECTED] writes:
The `working' test case omits the
AND (account, policy) NOT IN
(SELECT account, policy FROM policy_accounts_active)
condition from the end of executor_active, which magically makes the
Brandon Craig Rhodes [EMAIL PROTECTED] writes:
If I understand your assertion, NEW does *not* in fact refer strictly
to the rows that (in this case) were INSERTed by the upstream query;
rather, NEW refers to a re-invocation - a copy or re-execution - of
the query which produced the NEW rows
Tom Lane [EMAIL PROTECTED] writes:
While rule-as-macro works beautifully for views, I've never been
entirely satisfied with it for updating queries. ... It would take a
rather fundamental redesign of the rule system to do differently,
though. Are you volunteering?
From what I have seen of