Isn't PLy_spi_execute_fetch_result completely broken?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Isn't PLy_spi_execute_fetch_result completely broken?
Date: 2013-07-19 22:37:14
Message-ID: 21017.1374273434@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-07-19 23:14:48 Re: Insert result does not match record count
Previous Message Natalie Wenz 2013-07-19 22:20:13 Insert result does not match record count