Isn't PLy_spi_execute_fetch_result completely broken? - Mailing list pgsql-hackers

From Tom Lane
Subject Isn't PLy_spi_execute_fetch_result completely broken?
Date
Msg-id 21017.1374273434@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
This function appears to believe that it can PG_CATCH any random error
and then just carry on, without doing a subtransaction cleanup.  This
is as wrong as can be.  It might be all right if we had sufficiently
narrow constraints on what could happen inside the PG_TRY block, but in
point of fact it's calling datatype input functions, which could do
anything whatsoever.  I think it needs to do PG_RE_THROW() not just
"return NULL" at the end of the CATCH.  It looks like both of the
existing callers have cleanup logic, so this should be sufficient.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Karol Trzcionka
Date:
Subject: Re: GSOC13 proposal - extend RETURNING syntax
Next
From: Dimitri Fontaine
Date:
Subject: Re: Proposal: template-ify (binary) extensions