From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Hadley Willan <hadley(dot)willan(at)deeperdesign(dot)co(dot)nz>, PGSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Reloading Template1 |
Date: | 2004-01-27 09:51:54 |
Message-ID: | 200401270951.54358.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday 27 January 2004 08:13, Hadley Willan wrote:
> Hello,
> I've accidently created a whole bunch of tables and sequences in
> template1.
>
> I didn't actually want the information in template1 but with the slip of
> a key my script piped all the commands into it and now all the info is
> there, doh!.
We all have doh! moments, you are not the first to be here.
> How to I recreate an empty template1?
Two options:
1. Manually undo all the changes (no, didn't think you liked that one)
2. Drop template1 and recreate it using template0
The createdb command has a flag to let you base your new database on something
other than template1. Actually, IIRC this is exactly why we have template0 -
for those occasions where you want to regenerate template1.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2004-01-27 10:05:16 | Re: Permission Problems:-)? |
Previous Message | Richard Huxton | 2004-01-27 09:45:39 | Re: crlf and copy |