summaryrefslogtreecommitdiff
path: root/libpqpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-02-11 17:04:10 +0000
committerrandomdan <randomdan@localhost>2011-02-11 17:04:10 +0000
commit32b68a8519f62a7aa47fe2b6ba3c2fbf411a4bc5 (patch)
tree64aafbcc9937e1dc3d12fce98e1c234f58f184e1 /libpqpp
parentSupport for table patching in different ways according to what the connector ... (diff)
downloadlibdbpp-postgresql-32b68a8519f62a7aa47fe2b6ba3c2fbf411a4bc5.tar.bz2
libdbpp-postgresql-32b68a8519f62a7aa47fe2b6ba3c2fbf411a4bc5.tar.xz
libdbpp-postgresql-32b68a8519f62a7aa47fe2b6ba3c2fbf411a4bc5.zip
Change formating for floating points - allows intergral FPs to work where integers are expected
Diffstat (limited to 'libpqpp')
-rw-r--r--libpqpp/command.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpqpp/command.cpp b/libpqpp/command.cpp
index eb5a6bf..7617bd1 100644
--- a/libpqpp/command.cpp
+++ b/libpqpp/command.cpp
@@ -107,14 +107,14 @@ void
PQ::Command::bindParamF(unsigned int n, double v)
{
paramsAtLeast(n);
- lengths[n] = asprintf(&values[n], "%f", v);
+ lengths[n] = asprintf(&values[n], "%g", v);
formats[n] = 0;
}
void
PQ::Command::bindParamF(unsigned int n, float v)
{
paramsAtLeast(n);
- lengths[n] = asprintf(&values[n], "%f", v);
+ lengths[n] = asprintf(&values[n], "%g", v);
formats[n] = 0;
}
void