template1, can there be a template2/3/4? - Mailing list pgsql-general

From Jim Mercer
Subject template1, can there be a template2/3/4?
Date
Msg-id 20010604111640.W9538@reptiles.org
Whole thread Raw
Responses Re: template1, can there be a template2/3/4?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: template1, can there be a template2/3/4?  (Jan Wieck <JanWieck@Yahoo.com>)
Re: template1, can there be a template2/3/4?  (will trillich <will@serensoft.com>)
List pgsql-general
as i understand the usage of template1, it holds the system catalogs,
users, etc, etc.

it is accessed as a quasi-shadow database supporting the actual production
data databases.

would it be possible for me to create a template2 and have some arbitrary
database use it instead of template1?

the reason i ask this is that it would be useful to have something to the
effect of:

database access startup for "sample" database.

if exists sample_cat database, use it instead of template1
otherwise use template1

this way "sample" could have its own set of users, permissions, etc, etc.

it would be a method for getting around the fact that a user in template1
has access to all of the other databases, modulo per-database permissions
via GRANT/REVOKE

does this make any sense?

--
[ Jim Mercer        jim@reptiles.org         +1 416 410-5633 ]
[ Now with more and longer words for your reading enjoyment. ]

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: upgrading a database with large objects
Next
From: Lamar Owen
Date:
Subject: Re: 7.1.2 packaging