Re: Cleaning up template 1 - Mailing list pgsql-sql

From Thomas Swan
Subject Re: Cleaning up template 1
Date
Msg-id 3C9F8E01.3090609@olemiss.edu
Whole thread Raw
In response to Cleaning up template 1  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
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.

>
>
>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
>





pgsql-sql by date:

Previous
From: Daniel Lundin
Date:
Subject: Re: Declaring arrays in plpgsql functions
Next
From: Thomas Good
Date:
Subject: Re: Cleaning up template 1