Willem Buitendyk <willem@pcfish.ca> writes:
> I sent you a test case.
Thanks for the test case --- I've committed a patch:
http://archives.postgresql.org/pgsql-committers/2008-02/msg00108.php
> The problem has since been resolved by changing
> one of my functions to VOLATILE instead of IMMUTABLE. This has caught
> me twice now in the last few days.
That's a fairly bad workaround (assuming that the function is a
legitimate candidate to be IMMUTABLE) because it defeats potential
optimizations.
What I'd suggest you do instead is rethink your apparently widespread
habit of whacking your view definitions around on-the-fly. This would
never have worked at all before PG 8.3 (and as you can see we still have
some bugs left in supporting it in 8.3 :-(). Even when it does work,
there is a whole lot of frantic paddling going on just under the
surface. We may sail serenely on like the swan, but not very speedily
...
regards, tom lane