diff options
author | Michael Meskes <meskes@postgresql.org> | 2011-07-18 16:30:51 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2011-07-18 16:34:24 +0200 |
commit | e9a1a0d00bd2b88844542e71884b1e9b8bd32fa1 (patch) | |
tree | 936a9de93df4d7c5190ce6392da1a9c61cf94fb9 /src | |
parent | e2bf6295993745f7f697a337346168826234720c (diff) | |
download | postgresql-e9a1a0d00bd2b88844542e71884b1e9b8bd32fa1.tar.gz |
Made ecpglib write double with a precision of 15 digits.
Patch by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/execute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 09e1a820d4..1e3d4182bb 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -672,12 +672,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strcpy(mallocedval, "array ["); for (element = 0; element < asize; element++) - sprintf(mallocedval + strlen(mallocedval), "%.14g,", ((float *) var->value)[element]); + sprintf(mallocedval + strlen(mallocedval), "%.15g,", ((float *) var->value)[element]); strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } else - sprintf(mallocedval, "%.14g", *((float *) var->value)); + sprintf(mallocedval, "%.15g", *((float *) var->value)); *tobeinserted_p = mallocedval; *malloced_p = true; @@ -692,12 +692,12 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia strcpy(mallocedval, "array ["); for (element = 0; element < asize; element++) - sprintf(mallocedval + strlen(mallocedval), "%.14g,", ((double *) var->value)[element]); + sprintf(mallocedval + strlen(mallocedval), "%.15g,", ((double *) var->value)[element]); strcpy(mallocedval + strlen(mallocedval) - 1, "]"); } else - sprintf(mallocedval, "%.14g", *((double *) var->value)); + sprintf(mallocedval, "%.15g", *((double *) var->value)); *tobeinserted_p = mallocedval; *malloced_p = true; |