diff options
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 7c0d6655498..a7dd8367bb7 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -3965,10 +3965,7 @@ plperl_spi_commit(void) PG_TRY(); { - if (ThereArePinnedPortals()) - ereport(ERROR, - (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot commit transaction while a cursor is open"))); + HoldPinnedPortals(); SPI_commit(); SPI_start_transaction(); @@ -3995,10 +3992,7 @@ plperl_spi_rollback(void) PG_TRY(); { - if (ThereArePinnedPortals()) - ereport(ERROR, - (errcode(ERRCODE_INVALID_TRANSACTION_TERMINATION), - errmsg("cannot abort transaction while a cursor is open"))); + HoldPinnedPortals(); SPI_rollback(); SPI_start_transaction(); |