PL/Python uses str(v) to convert float data, but is lossy
by design. Only repr(v) is guaranteed to have enough
precision to make floats roundtrip properly:
https://docs.python.org/2/library/functions.html#func-reprhttps://docs.python.org/2/library/functions.html#str
Example:
$ python
>>> repr(100100100.654321)
'100100100.654321'
>>> str(100100100.654321)
'100100100.654'
Attached patch uses PyObject_Repr() for float data.
As it's annoying-to-debug problem and the patch is simple,
perhaps it's worth backporting?
--
marko