Be more consistent about reporting SPI errors in the various PLs.
Tom Lane <tgl@sss.pgh.pa.us>
Be more consistent about reporting SPI errors in the various PLs. Create a shared function to convert a SPI error code into a string (replacing near-duplicate code in several PLs), and use it anywhere that a SPI function call error is reported.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/spi.c | modified | +63 −1 |
| src/include/executor/spi.h | modified | +2 −1 |
| src/pl/plperl/spi_internal.c | modified | +16 −75 |
| src/pl/plpgsql/src/pl_exec.c | modified | +26 −18 |
| src/pl/plpgsql/src/pl_handler.c | modified | +11 −9 |
| src/pl/plpython/plpython.c | modified | +12 −42 |
| src/pl/tcl/pltcl.c | modified | +7 −79 |