Improve exception usage in PL/Python
Peter Eisentraut <peter_e@gmx.net>
Improve exception usage in PL/Python Use the built-in TypeError, not SPIError, for errors having to do with argument counts or types. Use SPIError, not simply plpy.Error, for errors in PLy_spi_execute_plan. Finally, do not set a Python exception if PyArg_ParseTuple failed, as it already sets the correct exception. Jan Urbański
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/expected/plpython_unicode_2.out | modified | +1 −1 |
| src/pl/plpython/expected/plpython_unicode_3.out | modified | +1 −1 |
| src/pl/plpython/plpython.c | modified | +4 −8 |