Re: dropping template1 - Mailing list pgsql-general

From Neil Conway
Subject Re: dropping template1
Date
Msg-id 1042117566.376.43.camel@tokyo
Whole thread Raw
In response to Re: dropping template1  ("Thomas T. Thai" <tom@minnesota.com>)
Responses Re: dropping template1
List 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@samurai.com> || PGP Key ID: DB3C29FC




pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: dropping template1
Next
From: "Chris Boget"
Date:
Subject: Re: How can I do this?