12
12
* by PostgreSQL
13
13
*
14
14
* IDENTIFICATION
15
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.481 2008/01/01 19:45 :55 momjian Exp $
15
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.482 2008/01/30 18:35 :55 tgl Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -552,6 +552,20 @@ main(int argc, char **argv)
552
552
/* Set the datestyle to ISO to ensure the dump's portability */
553
553
do_sql_command (g_conn , "SET DATESTYLE = ISO" );
554
554
555
+ /*
556
+ * If supported, set extra_float_digits so that we can dump float data
557
+ * exactly (given correctly implemented float I/O code, anyway)
558
+ */
559
+ if (g_fout -> remoteVersion >= 70400 )
560
+ do_sql_command (g_conn , "SET extra_float_digits TO 2" );
561
+
562
+ /*
563
+ * If synchronized scanning is supported, disable it, to prevent
564
+ * unpredictable changes in row ordering across a dump and reload.
565
+ */
566
+ if (g_fout -> remoteVersion >= 80300 )
567
+ do_sql_command (g_conn , "SET synchronize_seqscans TO off" );
568
+
555
569
/*
556
570
* Start serializable transaction to dump consistent data.
557
571
*/
@@ -567,13 +581,6 @@ main(int argc, char **argv)
567
581
else
568
582
username_subquery = "SELECT usename FROM pg_user WHERE usesysid =" ;
569
583
570
- /*
571
- * If supported, set extra_float_digits so that we can dump float data
572
- * exactly (given correctly implemented float I/O code, anyway)
573
- */
574
- if (g_fout -> remoteVersion >= 70400 )
575
- do_sql_command (g_conn , "SET extra_float_digits TO 2" );
576
-
577
584
/* Find the last built-in OID, if needed */
578
585
if (g_fout -> remoteVersion < 70300 )
579
586
{
0 commit comments