Re: SPI_ERROR_CONNECT - Mailing list pgsql-general

From Tom Lane
Subject Re: SPI_ERROR_CONNECT
Date
Msg-id 18847.1202798625@sss.pgh.pa.us
Whole thread Raw
In response to Re: SPI_ERROR_CONNECT  (Willem Buitendyk <willem@pcfish.ca>)
Responses Re: SPI_ERROR_CONNECT
List pgsql-general
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

pgsql-general by date:

Previous
From: "Premsun Choltanwanich"
Date:
Subject: PostgreSQL does not support updateable cursors
Next
From: Willem Buitendyk
Date:
Subject: Re: SPI_ERROR_CONNECT