On Tuesday 27 January 2004 08:13, Hadley Willan wrote:
> I've accidently created a whole bunch of tables and sequences in
> 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?
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.
In response to
pgsql-general by date
|Next:||From: Richard Huxton||Date: 2004-01-27 10:05:16|
|Subject: Re: Permission Problems:-)?|
|Previous:||From: Richard Huxton||Date: 2004-01-27 09:45:39|
|Subject: Re: crlf and copy|