improve type conversion of SPI_processed in Python

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: improve type conversion of SPI_processed in Python
Date: 2017-12-19 18:40:26
Message-ID: 04b999c9-1d44-1dfc-0454-22c057d42c2c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is a patch to improves how PL/Python deals with very large values
of SPI_processed. The previous code converts anything that does not fit
into a C long into a Python float. But Python long has unlimited
precision, so we should be using that instead. And in Python 3, int and
long as the same, so there is no need to deal with any variations anymore.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Improve-type-conversion-of-SPI_processed-in-Python.patch text/plain 3.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-12-19 18:42:11 Re: vacuum vs heap_update_tuple() and multixactids
Previous Message Tom Lane 2017-12-19 18:37:40 Re: Using ProcSignal to get memory context stats from a running backend