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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
Date: 2015-12-01 16:43:14
Message-ID: E1a3o1K-0002AB-Dl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/74cf6defa79c64ce8ac3548210686abc3e8695d1

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

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-12-01 16:56:17 Re: pgsql: postgres_fdw: Add ORDER BY to some remote SQL queries.
Previous Message Bruce Momjian 2015-12-01 16:30:34 Re: pgsql: postgres_fdw: Add ORDER BY to some remote SQL queries.