[GENERAL] SPI_execute error handling

2015-09-07 Thread James Harper
The docs for SPI_execute at http://www.postgresql.org/docs/9.4/static/spi.html say: " Note that if a command invoked via SPI fails, then control will not be returned to your procedure. Rather, the transaction or subtransaction in which your procedure executes will be rolled back. (This might

Re: [GENERAL] SPI_execute error handling

2015-09-07 Thread Pavel Stehule
2015-09-07 11:04 GMT+02:00 James Harper : > The docs for SPI_execute at > http://www.postgresql.org/docs/9.4/static/spi.html say: > > " > Note that if a command invoked via SPI fails, then control will not be > returned to your procedure. Rather, the transaction or

Re: [GENERAL] SPI_execute error handling

2015-09-07 Thread James Harper
> Hi > > > When I need to solve similar situation, I take a code from plpgsql. > look on function exec_stmt_block. Similar code is in plpgsql_check > https://github.com/okbob/plpgsql_check/blob/master/plpgsql_check.c > Thanks. Got it sorted! James -- Sent via pgsql-general mailing list