| From: | Steven Klassen <sklassen(at)commandprompt(dot)com> |
|---|---|
| To: | Akbar <melinda_sayang(at)hotpop(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: cleaning up template1 |
| Date: | 2005-01-05 17:16:10 |
| Message-ID: | 20050105171609.GA2333@commandprompt.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
# I remember when I first play with postgresql, I play with template1
# directly not created first the database ( then play with it ). So I
# just want to know is there any way to cleaning up the template1?
This should do the trick.
xinu=# update pg_database set datistemplate = false where datname ='template1';
UPDATE 1
xinu=# drop database template1;
DROP DATABASE
xinu=# create database template1 with template = template0;
CREATE DATABASE
xinu=# update pg_database set datistemplate = true where datname ='template1';
UPDATE 1
--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Deepa K | 2005-01-06 04:37:05 | [Fwd: Day name, month name from a datetime field] |
| Previous Message | Kretschmer Andreas | 2005-01-05 16:31:46 | Re: Analysis Services supported by postgres? |