diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-10-28 15:45:28 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-10-28 15:50:42 -0400 |
commit | deb15803249883db031c6cc8af104b575f7809ad (patch) | |
tree | 6ad2634b022c64e6a71e42d9266d1726f87e0ddb | |
parent | 74812624f263a58789e894a643161c9148112f62 (diff) | |
download | postgresql-deb15803249883db031c6cc8af104b575f7809ad.tar.gz postgresql-deb15803249883db031c6cc8af104b575f7809ad.zip |
Remove hard-coded "\connect postgres" from pg_dumpall.
This doesn't appear to accompish anything useful, and does make the
restore fail if the postgres database happens to have been dropped.
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 0022d2d74ef..d138da568ea 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -441,7 +441,12 @@ main(int argc, char *argv[]) if (verbose) dumpTimestamp("Started on"); - fprintf(OPF, "\\connect postgres\n\n"); + /* + * We used to emit \connect postgres here, but that served no purpose + * other than to break things for installations without a postgres + * database. Everything we're restoring here is a global, so whichever + * database we're connected to at the moment is fine. + */ /* Replicate encoding and std_strings in output */ fprintf(OPF, "SET client_encoding = '%s';\n", |