Re: Moving from MySQL to PGSQL....some questions

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To:
Cc: Karam Chand <karam_chand03(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Moving from MySQL to PGSQL....some questions
Date: 2004-02-25 16:38:02
Message-ID: 403CCF6A.3080302@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dennis Bjorklund wrote:
> On Wed, 25 Feb 2004, Karam Chand wrote:
>
>>1.) What is template1 and template0? I assume these
>>are system databases. Am I right?
>
> When you create a new database what you get is a copy of template1.
>
> template0 is alsmost not used. If you mess up template1 so you can't
> create usable new databases one can use template0 to create a new
> template1.

More specifically (as I understand it) template1 is intended to be a
template (with default settings and the like) for creating new databases.
So (for example) if your business policy is that all created databases
use plpgsql, you can createlang it into template1, and every database
created thereafter will already have plpgsql. If you have specific
tables or the like that every database on that server should have, you
can put them in template1 so they are always there.

template0 is what you use to fix things, if you mess up template1
somehow.

--
Bill Moran
Potential Technologies
http://www.potentialtech.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Chaney 2004-02-25 16:40:50 Re: Moving from MySQL to PGSQL....some questions
Previous Message Jean-Michel POURE 2004-02-25 16:33:34 Re: Moving from MySQL to PGSQL....some questions