Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1EFHCE81135 for ; Thu, 14 Feb 2002 10:17:12 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g1EFGrf08700; Thu, 14 Feb 2002 10:16:54 -0500 (EST) To: Roy Cabaniss cc: "pgsql-admin@postgresql.org" Subject: Re: restoring template1 In-reply-to: <200202141443.g1EEhsG09560@cabanisspc.uamont.edu> References: <200202132049.g1DKntX03062@cabanisspc.uamont.edu> <1030.1013637792@sss.pgh.pa.us> <200202141443.g1EEhsG09560@cabanisspc.uamont.edu> Comments: In-reply-to Roy Cabaniss message dated "Thu, 14 Feb 2002 08:43:53 -0600" Date: Thu, 14 Feb 2002 10:16:53 -0500 Message-ID: <8697.1013699813@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200202/174 X-Sequence-Number: 3330 Roy Cabaniss writes: > southern=# DROP DATABASE template1; > ERROR: DROP DATABASE: database is marked as a template Sorry about that; but perhaps you should have read the whole section I pointed you to. The procedure that would actually work would be something like (as superuser, from a different database): regression=# update pg_database set datistemplate = false where datname regression-# = 'template1'; UPDATE 1 regression=# drop database template1; DROP DATABASE regression=# create database template1 with template = template0; CREATE DATABASE regression=# update pg_database set datistemplate = true where datname regression-# = 'template1'; UPDATE 1 regression=# regards, tom lane