From: Hiroshi Inoue Date: Fri, 6 Apr 2001 09:23:44 +0000 (+0000) Subject: 1) Fit the precision of floating point to that of server side X-Git-Tag: REL7_1~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef4a163afde6213c8d91a199d8fab5c769c0a127;p=postgresql 1) Fit the precision of floating point to that of server side (fix by Hiroki kataoka). 2) Ensure the definition of atof()(#include stdlib.h). (suggestion by Masaaki Sakaida). --- diff --git a/src/interfaces/odbc/convert.c b/src/interfaces/odbc/convert.c index 2dca3edfa1..1b56c5df88 100644 --- a/src/interfaces/odbc/convert.c +++ b/src/interfaces/odbc/convert.c @@ -42,6 +42,7 @@ #include #include +#include #include "convert.h" #include "statement.h" #include "qresult.h" @@ -892,12 +893,12 @@ copy_statement_with_parameters(StatementClass *stmt) break; case SQL_C_DOUBLE: - sprintf(param_string, "%f", + sprintf(param_string, "%15g", *((SDOUBLE *) buffer)); break; case SQL_C_FLOAT: - sprintf(param_string, "%f", + sprintf(param_string, "%6g", *((SFLOAT *) buffer)); break;