473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Reloading Template1

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

Problem is now that I try to create the DB I want, all the view and
structures are already there.

How to I recreate an empty template1?

Thanks
--
Hadley Willan » Director » ha***********@deeperdesign.com » +64(21) 28
41 463
Deeper Design Limited » +64(7) 377 3328 » www.deeperdesign.com

Nov 22 '05 #1
5 1391
Dear Hadley Willan ,

Read This
http://techdocs.postgresql.org/redir...enturesep1.php


--
Regards,
Vishal Kashyap

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
I Know you believe my words so logon to Jabber.org
and add vi***********@jabber.org to your roster.
OR
Seek Me at 264360076
~*~*~*~*~*~*~*~*
I am usually called as Vishal Kashyap
but my Girlfriend calls me as Vishal CASH UP.
This is because others identify me because of my generosity
but my Girlfriend identify me because of my CASH.
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Nov 22 '05 #2
Dear Hadley Willan ,

Read This
http://techdocs.postgresql.org/redir...enturesep1.php


--
Regards,
Vishal Kashyap

~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
I Know you believe my words so logon to Jabber.org
and add vi***********@jabber.org to your roster.
OR
Seek Me at 264360076
~*~*~*~*~*~*~*~*
I am usually called as Vishal Kashyap
but my Girlfriend calls me as Vishal CASH UP.
This is because others identify me because of my generosity
but my Girlfriend identify me because of my CASH.
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Nov 22 '05 #3
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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #4
Richard Huxton <de*@archonet.com> writes:
Actually, IIRC this is exactly why we have template0 -
for those occasions where you want to regenerate template1.


Well, that's one of its uses.

IIRC there is a page on techdocs.postgresql.org that will walk you
through this procedure. There are a couple of safety interlocks you
need to defeat temporarily, so it's a bit more than a DROP and a CREATE.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #5
Thanks everybody for your help.

It was a pretty simple procedure at the end of the day and I've learned
a valuable lesson, remember which DB its all going to!

Thanks again.

Hadley

On Wed, 2004-01-28 at 10: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!.

Problem is now that I try to create the DB I want, all the view and
structures are already there.

How to I recreate an empty template1?

Thanks



Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Greg Bryant | last post by:
Wondering why my setcookies didn't have any impact, I noticed the line in the manual that said the page needs to be reloaded before they take effect (which does make a certain kind of sense). So,...
3
by: jbj | last post by:
Something like a php function that can be called? I have php in a page that needs to be update periodically (basically poll results) without reloading the page around it (I do have a button you...
8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
2
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
5
by: Frank van Vugt | last post by:
Hi, I noticed that when using the single commandline: drop database <name>; create database <name>; this sometimes fails due to a pg_autovacuum process running on the background. When...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
1
by: CSN | last post by:
I have two machines between which I exchange dumps a lot. On the first (Windows/cygwin), pgsql was set up with "Administrator" as the main superuser - who owns all schemas in template0 and...
1
by: Michal Taborsky | last post by:
Hi there. I had a weak moment and accidentally ran a dump restore script on template1 instead of proper database. So my template1 is now polluted with many tables, sequences and the like. Is...
9
by: andrewfelch | last post by:
Hello all, I'm using the metaclass trick for automatic reloading of class member functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 My problem is that if I 1)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.