]> granicus.if.org Git - postgresql/commit
Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Dec 2015 16:42:25 +0000 (11:42 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Dec 2015 16:42:35 +0000 (11:42 -0500)
commitc79bdc9904afefeee495455be7dea737d714fbb4
tree1c7968e27d0862019affec852cf837e2023e2888
parent6fe8ca0a2f8ac5ce2656addb0f6741b5315a8a23
Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().

The previous coding could overrun the provided buffer size for a very large
input, or lose precision for a very small input.  Adopt the methodology
that's been in use in the equivalent backend code for a long time.

Per private report from Bas van Schaik.  Back-patch to all supported
branches.
src/interfaces/ecpg/pgtypeslib/numeric.c