Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
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.

greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,lisakowen/gpdb,jmcatamney/gpdb,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,xinzweb/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,jmcatamney/gpdb,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,adam8157/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb