Re: Moving from MySQL to PGSQL....some questions - Mailing list pgsql-general

From Bill Moran
Subject Re: Moving from MySQL to PGSQL....some questions
Date
Msg-id 403CCF6A.3080302@potentialtech.com
Whole thread Raw
In response to Re: Moving from MySQL to PGSQL....some questions  (Dennis Bjorklund <db@zigo.dhs.org>)
List 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


pgsql-general by date:

Previous
From: Michael Chaney
Date:
Subject: Re: Moving from MySQL to PGSQL....some questions
Next
From: Tom Lane
Date:
Subject: Re: invalid memory alloc request size