postgres.git / summary / log / commit / refs
commit 77a7a57f7fb8f9c1fc6449938f459d17cc2cfc80
Author: Michael Meskes <meskes@postgresql.org>
Date: Mon Jul 18 14:25:27 2011 +0000
First released in: 9.2.0, 8.2.22, 8.3.16, 8.4.9, 9.0.5, 9.1.0
Made ecpglib write double with a precision of 15 digits.
Patch originally by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
src/interfaces/ecpg/ecpglib/execute.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 72eed587461..1019bfe6201 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -478,7 +478,7 @@ sprintf_double_value(char *ptr, double value, const char *delim)
sprintf(ptr, "%s%s", "Infinity", delim);
}
else
- sprintf(ptr, "%.14g%s", value, delim);
+ sprintf(ptr, "%.15g%s", value, delim);
}
static void
@@ -494,7 +494,7 @@ sprintf_float_value(char *ptr, float value, const char *delim)
sprintf(ptr, "%s%s", "Infinity", delim);
}
else
- sprintf(ptr, "%.14g%s", value, delim);
+ sprintf(ptr, "%.15g%s", value, delim);
}
bool
[parent: d662e3970d26]