Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" ) - Mailing list pgsql-general

From Tom Lane
Subject Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )
Date
Msg-id 2236.1045882267@sss.pgh.pa.us
Whole thread Raw
In response to Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )  (Eric B.Ridge <ebr@tcdi.com>)
Responses Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )
List pgsql-general
"Eric B.Ridge" <ebr@tcdi.com> writes:
> So after upgrading from 7.2.3 to 7.3.2, I've got some interesting
> problems.
> The backend simply saysr:
>     FATAL:  SPI: improper call to spi_dest_setup

Yeah, 7.3.2 has some problems with rules that issue multiple commands of
the same type (like your INSERTs) :-(.  This was just noticed and fixed
about a week ago:

2003-02-14 16:12  tgl

    * src/backend/executor/: spi.c (REL7_3_STABLE), spi.c: Fix SPI
    result logic for case where there are multiple statements of the
    same type in a rule.  Per bug report from Pavel Hanak.

If you pull down the latest 7.3 branch version of spi.c from
http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/executor/spi.c

things should work again for you.

Sorry about that :-( ... this was an unexpected side effect of a bug fix
back in January ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: A problem with sequences...
Next
From: Tom Lane
Date:
Subject: Re: How to update rows from a cursor in PostgreSQL