summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-06-21 04:02:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-06-21 04:02:34 +0000
commit6f7fc0badef55b376f408bd318a8065fd2edf266 (patch)
treeb86da563c6c8de5c930f00e8f2a7d5a994ba2d18 /src/bin/pg_dump
parentec3a1af0a89a169c100f7157f7c6932234ae5988 (diff)
downloadpostgresql-6f7fc0badef55b376f408bd318a8065fd2edf266.tar.gz
Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in terms of backend functionality. However, all external utilities such as createuser and createdb now connect to "postgres" instead of template1, and the documentation is changed to encourage people to use "postgres" instead of template1 as a play area. This should fix some longstanding gotchas involving unexpected propagation of database objects by createdb (when you used template1 without understanding the implications), as well as ameliorating the problem that CREATE DATABASE is unhappy if anyone else is connected to template1. Patch by Dave Page, minor editing by Tom Lane. All per recent pghackers discussions.
Diffstat (limited to 'src/bin/pg_dump')
-rw-r--r--src/bin/pg_dump/pg_dumpall.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 07a08c41d8..0ed8b921b8 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.59 2005/04/18 23:47:52 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.60 2005/06/21 04:02:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -297,13 +297,13 @@ main(int argc, char *argv[])
}
- conn = connectDatabase("template1", pghost, pgport, pguser, force_password);
+ conn = connectDatabase("postgres", pghost, pgport, pguser, force_password);
printf("--\n-- PostgreSQL database cluster dump\n--\n\n");
if (verbose)
dumpTimestamp("Started on");
- printf("\\connect \"template1\"\n\n");
+ printf("\\connect \"postgres\"\n\n");
if (!data_only)
{
@@ -880,7 +880,7 @@ runPgDump(const char *dbname)
/*
* Win32 has to use double-quotes for args, rather than single quotes.
* Strangely enough, this is the only place we pass a database name on
- * the command line, except template1 that doesn't need quoting.
+ * the command line, except "postgres" which doesn't need quoting.
*/
#ifndef WIN32
appendPQExpBuffer(cmd, "%s\"%s\" %s -Fp '", SYSTEMQUOTE, pg_dump_bin,