pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Roy Cabaniss <rcaban@cabanisspc.uamont.edu>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: restoring template1
Date: Thu, 14 Feb 2002 10:16:53 -0500
Message-ID: <8697.1013699813@sss.pgh.pa.us> (raw)
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>

Roy Cabaniss <rcaban@cabanisspc.uamont.edu> 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



view thread (5+ messages)

Message-ID: <8697.1013699813@sss.pgh.pa.us>
Permalink:  ../8697.1013699813@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8697.1013699813@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rcaban@cabanisspc.uamont.edu
  Subject: Re: restoring template1
  In-Reply-To: <8697.1013699813@sss.pgh.pa.us>
  References: <200202132049.g1DKntX03062@cabanisspc.uamont.edu> <1030.1013637792@sss.pgh.pa.us> <200202141443.g1EEhsG09560@cabanisspc.uamont.edu> <8697.1013699813@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox