Improve exception usage in PL/Python

Peter Eisentraut <peter_e@gmx.net>

Commit: 582b5ac62e74a553e72151b321804a7b2e5fed6f
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2011-01-26T22:47:14Z
Releases: 9.1.0
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