Received: from firewall.oxford.d2interactive.com (adsl-81-102-77.jan.bellsouth.net [65.81.102.77]) by postgresql.org (Postfix) with ESMTP id 5E714475858 for ; Mon, 25 Mar 2002 16:16:27 -0500 (EST) Received: from olemiss.edu (host128.oxford.d2interactive.com [192.168.0.128]) by firewall.oxford.d2interactive.com (8.11.6/linuxconf) with ESMTP id g2PLGQR24269; Mon, 25 Mar 2002 15:16:27 -0600 Message-ID: <3C9F93AA.9010405@olemiss.edu> Date: Mon, 25 Mar 2002 15:16:26 -0600 From: Thomas Swan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9+) Gecko/20020325 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Swan Cc: Josh Berkus , pgsql-sql@postgresql.org Subject: Re: Cleaning up template 1 References: <3C9F8E01.3090609@olemiss.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200203/332 X-Sequence-Number: 7207 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