pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Swan <tswan@olemiss.edu>
To: Thomas Swan <tswan@olemiss.edu>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cleaning up template 1
Date: Mon, 25 Mar 2002 15:16:26 -0600
Message-ID: <3C9F93AA.9010405@olemiss.edu> (raw)
References: <web-838475@davinci.ethosmedia.com>
	<3C9F8E01.3090609@olemiss.edu>

Thomas Swan wrote:

> Josh Berkus wrote:
>
>> Folks,
>>
>> Due to an accident with a script, I created about 200 objects in the
>> template1 database instead of the database for which they were
>> intended.  I am now faced with either deleting each of these object 
>> individually,
>> or dumping my whole postgresql installation and re-installing each
>> user database, one at a time.
>>
> If this is 7.2 you should be able to drop template1 and do create 
> database template1 from template0. 
> DROP DATABASE template1;
> CREATE DATABASE template1 WITH TEMPLATE=template0;
>
> Check first with another installation as I'm not too sure about the 
> ramifications. 

If you installed languages on template1 for defaults you will need to 
recreate them for the new template1 database.  I forgot template0 was 
completely empty.  

>
>
>>
>>
>> Can anyone suggest any shortcuts for fixing this problem?
>>
>> -Josh
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/users-lounge/docs/faq.html
>>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org







view thread (7+ messages)  latest in thread

Message-ID: <3C9F93AA.9010405@olemiss.edu>
Permalink:  ../3C9F93AA.9010405@olemiss.edu/
Also on:    postgresql.org/message-id/3C9F93AA.9010405@olemiss.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tswan@olemiss.edu, josh@agliodbs.com
  Subject: Re: Cleaning up template 1
  In-Reply-To: <3C9F93AA.9010405@olemiss.edu>

* 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