On Fri, 2006-05-12 at 15:57 +0200, Martijn van Oosterhout wrote: > It's a known problem. It's also one of the reasons why triggers are > recommended over rules. And it's not desirable behaviour. Well, triggers cannot be used to create writeable views, can they? > There have been discussions about the problems Do you have some pointers here? I did not find relevant discussions in the archives (of gmane.org) > Yet no-one has come up with an > alternative that covers the current uses... As far as I know, the rewriter simply copies plan tree nodes. I thought about inserting an 'evaluate-only-once' node which is linked from all rules and points to the expression to evaluate (instead of copying the complete explession and evaluating it several times in the executor). Regards Markus