Re: template1, can there be a template2/3/4?
От | will trillich |
---|---|
Тема | Re: template1, can there be a template2/3/4? |
Дата | |
Msg-id | 20010606192730.B4612@serensoft.com обсуждение исходный текст |
Ответ на | template1, can there be a template2/3/4? (Jim Mercer <jim@reptiles.org>) |
Список | pgsql-general |
On Mon, Jun 04, 2001 at 11:16:40AM -0400, Jim Mercer wrote: > 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? as has already been discussed, template1 is basically the default template to copy when creating a new database. as for which relations are system-wide (versus database-specific) check for files in /var/lib/postgres/data/pg_*: pg_control pg_database pg_geqo pg_group pg_group_name_index pg_group_sysid_index pg_hba.conf pg_ident.conf pg_log pg_pwd pg_pwd.reload pg_shadow pg_variable (note that some of those are conf files, not db relations...) all the other 'system' tables ARE database-specific and thus reside in their respective subdirectories at /var/lib/postgres/data/base/<databasename>/pg_* -- #95: We are waking up and linking to each other. We are watching. But we are not waiting. -- www.cluetrain.com will@serensoft.com http://sourceforge.net/projects/newbiedoc -- we need your brain! http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления: