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

From Tom Lane
Subject Re: template1, can there be a template2/3/4?
Date
Msg-id 6321.991672148@sss.pgh.pa.us
Whole thread Raw
In response to Re: template1, can there be a template2/3/4?  (Jim Mercer <jim@reptiles.org>)
List pgsql-general
Jim Mercer <jim@reptiles.org> writes:
> ah, so users/groups are not stored in template1, but in some other series
> of physical files.

pg_shadow/pg_group are installation-wide; they do not belong to any
individual database.  This is done via special hacks (cf
IsSharedSystemRelation).

> i imagine it would be architectually difficult to have seperate user/group
> tables per database.

Codewise it would be trivial --- remove 'em from the list of shared
relations.  From the point of view of backwards compatibility, however,
that's not likely to happen.

If you want to restrict users to connect only to their own database,
the 'sameuser' option in pg_hba.conf might be helpful.

            regards, tom lane

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: datestyle
Next
From: Jan Wieck
Date:
Subject: Re: template1, can there be a template2/3/4?