Add new return codes SPI_OK_INSERT_RETURNING etc to the SPI API.
Tom Lane <tgl@sss.pgh.pa.us>
Add new return codes SPI_OK_INSERT_RETURNING etc to the SPI API. Fix all the standard PLs to be able to return tuples from FOO_RETURNING statements as well as utility statements that return tuples. Also, fix oversight that SPI_processed wasn't set for a utility statement returning tuples. Per recent discussion.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/spi.sgml | modified | +44 −14 |
| src/backend/executor/spi.c | modified | +24 −5 |
| src/include/executor/spi.h | modified | +4 −1 |
| src/pl/plperl/plperl.c | modified | +2 −2 |
| src/pl/plpgsql/src/pl_exec.c | modified | +7 −20 |
| src/pl/plpython/plpython.c | modified | +4 −9 |
| src/pl/tcl/pltcl.c | modified | +12 −5 |