mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 17:01:17 +02:00
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).
This commit is contained in:
parent
f7f0b17909
commit
ef4a163afd
@ -42,6 +42,7 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "convert.h"
|
#include "convert.h"
|
||||||
#include "statement.h"
|
#include "statement.h"
|
||||||
#include "qresult.h"
|
#include "qresult.h"
|
||||||
@ -892,12 +893,12 @@ copy_statement_with_parameters(StatementClass *stmt)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SQL_C_DOUBLE:
|
case SQL_C_DOUBLE:
|
||||||
sprintf(param_string, "%f",
|
sprintf(param_string, "%15g",
|
||||||
*((SDOUBLE *) buffer));
|
*((SDOUBLE *) buffer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SQL_C_FLOAT:
|
case SQL_C_FLOAT:
|
||||||
sprintf(param_string, "%f",
|
sprintf(param_string, "%6g",
|
||||||
*((SFLOAT *) buffer));
|
*((SFLOAT *) buffer));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user