summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorTom Lane2009-09-11 19:17:04 +0000
committerTom Lane2009-09-11 19:17:04 +0000
commit8c5463a51176c8d2a01fcf154d7ac33fa9a74f6a (patch)
tree9e8efe691f08fe96df16ef954ed7934885c4b9a7 /src/bin
parent680bf3268c91d188c018470491ce6ab146960b28 (diff)
Increase the maximum value of extra_float_digits to 3, and have pg_dump
use that value when the backend is new enough to allow it. This responds to bug report from Keh-Cheng Chu pointing out that although 2 extra digits should be sufficient to dump and restore float8 exactly, it is possible to need 3 extra digits for float4 values.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_dump/pg_dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c5f97ca053c..5856dc7049a 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.546 2009/08/04 19:46:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.547 2009/09/11 19:17:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -595,7 +595,9 @@ main(int argc, char **argv)
* If supported, set extra_float_digits so that we can dump float data
* exactly (given correctly implemented float I/O code, anyway)
*/
- if (g_fout->remoteVersion >= 70400)
+ if (g_fout->remoteVersion >= 80500)
+ do_sql_command(g_conn, "SET extra_float_digits TO 3");
+ else if (g_fout->remoteVersion >= 70400)
do_sql_command(g_conn, "SET extra_float_digits TO 2");
/*