On Mar 25, 2006, at 12:24 AM, Tom Lane wrote:
This is the sort of detail that you really should not omit.
Yeah, it didn't even occur to me until I ran the "explain execute foo
(42)" thing you suggested. We've been using these update rules for
so long that I just think of the views as regular tables (rules are
great, btw).
If you were using something newer than 7.4 then I'd ask for a complete
test case so I could look into improving the behavior --- but as it
is,
I'd first suggest upgrading and seeing if the problem is already
fixed.
We're working towards an upgrade to 8.1.3, and a new schema. Both of
which will likely provide all sorts of new "behaviors."
I'm now curious if complex rules can influence the planner in
negative ways. I don't see how they could -- I've never seen
unexpected EXPLAIN output via psql. However, I can try to work up a
test case against 7.4.12 if you think it'll be beneficial. It'll
take a few days and if you wanted 2 million-ish sample rows, be very
large.
eric