pgsql: Improve type conversion of SPI_processed in Python

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve type conversion of SPI_processed in Python
Date: 2018-01-20 13:04:48
Message-ID: E1ecspE-0007fA-LU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve type conversion of SPI_processed in Python

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.

Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/918e02a221db1ee40d545cb05dc9d8d392b4b743

Modified Files
--------------
src/pl/plpython/plpy_cursorobject.c | 4 +---
src/pl/plpython/plpy_spi.c | 8 ++------
2 files changed, 3 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2018-01-21 02:47:16 pgsql: doc: update intermediate certificate instructions
Previous Message Tom Lane 2018-01-20 03:16:28 pgsql: Suppress possibly-uninitialized-variable warnings.