aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-04-27 11:07:52 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-04-27 11:07:52 -0400
commit9b1508af8971c1627cda5bb65f5e9eddb9a1a55e (patch)
tree9f14b08e11418c8f581585655d3c1cfbd1936e31 /src/interfaces/ecpg/ecpglib/execute.c
parent52d01c2f52c462d29ae0fdfa44c3cae129148a6d (diff)
downloadpostgresql-9b1508af8971c1627cda5bb65f5e9eddb9a1a55e.tar.gz
postgresql-9b1508af8971c1627cda5bb65f5e9eddb9a1a55e.zip
Remove hard coded formats for INT64 and use configured settings instead.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 970fa935099..0e908c99b06 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -689,12 +689,12 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
- sprintf(mallocedval + strlen(mallocedval), "%lld,", ((long long int *) var->value)[element]);
+ sprintf(mallocedval + strlen(mallocedval), INT64_FORMAT ",", ((long long int *) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
- sprintf(mallocedval, "%lld", *((long long int *) var->value));
+ sprintf(mallocedval, INT64_FORMAT, *((long long int *) var->value));
*tobeinserted_p = mallocedval;
break;
@@ -708,12 +708,12 @@ ecpg_store_input(const int lineno, const bool force_indicator, const struct vari
strcpy(mallocedval, "array [");
for (element = 0; element < asize; element++)
- sprintf(mallocedval + strlen(mallocedval), "%llu,", ((unsigned long long int *) var->value)[element]);
+ sprintf(mallocedval + strlen(mallocedval), UINT64_FORMAT ",", ((unsigned long long int *) var->value)[element]);
strcpy(mallocedval + strlen(mallocedval) - 1, "]");
}
else
- sprintf(mallocedval, "%llu", *((unsigned long long int *) var->value));
+ sprintf(mallocedval, UINT64_FORMAT, *((unsigned long long int *) var->value));
*tobeinserted_p = mallocedval;
break;