Обсуждение: template1 database

Поиск
Список
Период
Сортировка

template1 database

От
Eimantas Vaičiūnas
Дата:
Hi list,

I've recently started using PgSQL and i must say it gose quite good as far as
i can say. Just been wondering how important is template1 database to PgSQL?
What would happen if i drop this database together with postgres user.
--
Eimantas Vaičiūnas
VU Skaičiavimo centras

Re: template1 database

От
Tom Lane
Дата:
Eimantas =?utf-8?q?Vai=C4=8Di=C5=ABnas?= <eimantas.vaiciunas@sc.vu.lt> writes:
> Just been wondering how important is template1 database to PgSQL?

The database server itself doesn't care, but there are enough
client-side tools that assume template1 exists that you would not
find life pleasant if you do this.

> What would happen if i drop this database together with postgres user.

The root user does not have to be named "postgres", but you do have to
have a root user.  What exactly do you think will be accomplished by
removing the postgres user?

If you are just idly searching for ways to break your database, try
removing some of the builtin datatypes from pg_type, or builtin
functions from pg_proc, etc ...

            regards, tom lane

Re: template1 database

От
Michael Fuhr
Дата:
On Thu, Mar 10, 2005 at 08:17:03AM +0000, Eimantas Vai??i??nas wrote:

> I've recently started using PgSQL and i must say it gose quite good as far as
> i can say. Just been wondering how important is template1 database to PgSQL?
> What would happen if i drop this database together with postgres user.

See "Template Databases" in the "Managing Databases" chapter of the
documentation, as well as the "Database Users and Privileges" chapter:

http://www.postgresql.org/docs/8.0/interactive/manage-ag-templatedbs.html
http://www.postgresql.org/docs/8.0/interactive/user-manag.html

Is there a reason you're thinking about dropping template1 and the
postgres user?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/