mirror of
https://github.com/postgres/postgres.git
synced 2025-08-05 07:41:25 +03:00
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.
This commit is contained in:
@@ -441,7 +441,12 @@ main(int argc, char *argv[])
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
dumpTimestamp("Started on");
|
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 */
|
/* Replicate encoding and std_strings in output */
|
||||||
fprintf(OPF, "SET client_encoding = '%s';\n",
|
fprintf(OPF, "SET client_encoding = '%s';\n",
|
||||||
|
Reference in New Issue
Block a user