From 2cf48ca04bf59985117e04dd71644a507be90dbb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 14 Nov 2000 18:37:49 +0000 Subject: Extend CREATE DATABASE to allow selection of a template database to be cloned, rather than always cloning template1. Modify initdb to generate two identical databases rather than one, template0 and template1. Connections to template0 are disallowed, so that it will always remain in its virgin as-initdb'd state. pg_dumpall now dumps databases with restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0. This allows proper behavior when there is user-added data in template1. initdb forced! --- src/include/commands/dbcommands.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include/commands/dbcommands.h') diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h index 94431503537..903368e3f9c 100644 --- a/src/include/commands/dbcommands.h +++ b/src/include/commands/dbcommands.h @@ -7,14 +7,15 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: dbcommands.h,v 1.13 2000/01/26 05:58:00 momjian Exp $ + * $Id: dbcommands.h,v 1.14 2000/11/14 18:37:47 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef DBCOMMANDS_H #define DBCOMMANDS_H -extern void createdb(const char *dbname, const char *dbpath, int encoding); +extern void createdb(const char *dbname, const char *dbpath, + const char *dbtemplate, int encoding); extern void dropdb(const char *dbname); #endif /* DBCOMMANDS_H */ -- cgit v1.2.3