Kyle Bateman <kyle@actarg.com> writes:
> BTW, do you have an equally sensible explanation of how the "where
> condition" that is part of the rule syntax differs from the where
> clause that comes after the "do instead"?
The rule WHERE condition determines *whether* the rule is fired for
update of a given view tuple. (If it isn't, then that tuple is
processed as if there were no rule.) Assuming that the rule fires,
a WHERE inside its action will determine which tuples it actually
acts on.
I think there are some examples in the docs of uses of nonempty rule
WHERE conditions. If not, you could try looking at the rules regression
test for examples ...
regards, tom lane