mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
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>
This commit is contained in:
@@ -122,6 +122,7 @@ SELECT * FROM test_type_conversion_float8(100);
|
||||
SELECT * FROM test_type_conversion_float8(-100);
|
||||
SELECT * FROM test_type_conversion_float8(5000000000.5);
|
||||
SELECT * FROM test_type_conversion_float8(null);
|
||||
SELECT * FROM test_type_conversion_float8(100100100.654321);
|
||||
|
||||
|
||||
CREATE FUNCTION test_type_conversion_oid(x oid) RETURNS oid AS $$
|
||||
|
||||
Reference in New Issue
Block a user