]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use pg_dump's --quote-all-identifiers option in pg_upgrade.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 May 2013 21:34:45 +0000 (17:34 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 May 2013 21:34:45 +0000 (17:34 -0400)
This helps guard against changes in the set of reserved keywords from
one version to another.  In theory it should only be an issue if we
de-reserve a keyword in a newer release, since that can create the type
of problem shown in bug #8128.

Back-patch to 9.1 where the --quote-all-identifiers option was added.

contrib/pg_upgrade/dump.c

index 746ad757d67e32b1584cc6092c2879b74cec1f98..167e5502c3e49e9707ef5cb74a5eb06a93195803 100644 (file)
@@ -22,7 +22,8 @@ generate_old_dump(void)
         */
        exec_prog(true,
                          SYSTEMQUOTE "\"%s/pg_dumpall\" --port %d --username \"%s\" "
-                         "--schema-only --binary-upgrade -f \"%s/" ALL_DUMP_FILE "\""
+                         "--schema-only --quote-all-identifiers --binary-upgrade "
+                         "-f \"%s/" ALL_DUMP_FILE "\""
                          SYSTEMQUOTE, new_cluster.bindir, old_cluster.port, os_info.user, os_info.cwd);
        check_ok();
 }