Improve type conversion of SPI_processed in Python

Enterprise / PostgreSQL - Peter Eisentraut [gmx.net] - 20 January 2018 13:02 EST

The previous code converted SPI_processed to a Python float if it didn't fit into a Python int. But Python longs have unlimited precision, so use that instead in all cases.

As in eee50a8d4c389171ad5180568a7221f7e9b28f09, we use the Python LongLong API unconditionally for simplicity.

918e02a221 Improve type conversion of SPI_processed in Python
src/pl/plpython/plpy_cursorobject.c | 4 +---
src/pl/plpython/plpy_spi.c | 8 ++------
2 files changed, 3 insertions(+), 9 deletions(-)

Upstream: git.postgresql.org


  • Share