Re: dropping template1

Neil Conway <neilc@samurai.com>

From: Neil Conway <neilc@samurai.com>
To: tom@minnesota.com
Cc: shridhar_daithankar@persistent.co.in, PostgreSQL General <pgsql-general@postgresql.org>
Date: 2003-01-09T13:06:06Z
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@samurai.com> || PGP Key ID: DB3C29FC