From 6f7fc0badef55b376f408bd318a8065fd2edf266 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 21 Jun 2005 04:02:34 +0000 Subject: 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. --- src/backend/commands/dbcommands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/dbcommands.c') diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 40cfb3e6586..135c8a73f53 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.159 2005/06/06 20:22:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.160 2005/06/21 04:02:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -93,7 +93,7 @@ createdb(const CreatedbStmt *stmt) DefElem *dencoding = NULL; char *dbname = stmt->dbname; char *dbowner = NULL; - char *dbtemplate = NULL; + const char *dbtemplate = NULL; int encoding = -1; #ifndef WIN32 -- cgit v1.2.3