]> granicus.if.org Git - postgresql/commit
PL/Python: Avoid lossiness in float conversion
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 11 Mar 2015 19:44:17 +0000 (15:44 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 11 Mar 2015 19:46:06 +0000 (15:46 -0400)
commit1ce7a57ca6e8c5212fa2ab3bf31d56c74d5b5b8f
tree5fdfa4fed33013bdc19b14844f765037c27f1939
parentbc93ac12c2544b6b3a68b6cb0282e0828fa14a34
PL/Python: Avoid lossiness in float conversion

PL/Python uses str() to convert Python values back to PostgreSQL, but
str() is lossy for float values, so use repr() instead in that case.

Author: Marko Kreen <markokr@gmail.com>
src/pl/plpython/expected/plpython_types.out
src/pl/plpython/plpy_typeio.c
src/pl/plpython/sql/plpython_types.sql