pgsql: Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
Date
Msg-id E1a3o1K-0002A8-Da@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3e6e98c5a8551e3b90bbc82d5bdad2f574a6f508

Modified Files
--------------
src/interfaces/ecpg/pgtypeslib/numeric.c |    5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
Next
From: Tom Lane
Date:
Subject: pgsql: Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().