Re: dropping template1

From: Neil Conway <neilc(at)samurai(dot)com>
To: tom(at)minnesota(dot)com
Cc: shridhar_daithankar(at)persistent(dot)co(dot)in, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: dropping template1
Date: 2003-01-09 13:06:06
Message-ID: 1042117566.376.43.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2003-01-09 at 02:40, Thomas T. Thai wrote:
> there are lots of functions and datatypes etc. is there an easier way?

Try this:

(1) UPDATE pg_database SET datistemplate = false WHERE datname =
'template1';

(2) DROP DATABASE template1;

(3) CREATE DATABASE template1 WITH template template0;

(4) UPDATE pg_database SET datistemplate = true WHERE datname =
'template1';

Cheers,

Neil
--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Boget 2003-01-09 13:08:15 Re: How can I do this?
Previous Message Shridhar Daithankar 2003-01-09 12:28:35 Re: dropping template1