Re: pg_database datistemplate

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_database datistemplate
Дата
Msg-id 14393.1035491991@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_database datistemplate  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: pg_database datistemplate  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> In the docs it is mentioned for datistemplate that
> "If true then this database can be used in the "TEMPLATE" clause of
> CREATE DATABASE to create the new database as a clone of this one."

Right.

> However, one can create a database using as template another DB that has
> datistemplate set to false.

Only if one is owner of the source database (or superuser).

> In this situation, what is the point of having datistemplate?

Effectively, it's a "grant right to copy" flag.

Now that we have per-database ACLs, we should probably replace
datistemplate with an access right; instead of setting it you'd
do something like GRANT COPY ON DATABASE foo TO PUBLIC.

(We'd also talked about replacing datallowconn with an access right,
although that is more likely to break existing apps, since a fair
number of them look at datallowconn.)

Too late for 7.3 though ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: korry
Дата:
Сообщение: Re: pg_database datistemplate
Следующее
От: cbbrowne@cbbrowne.com
Дата:
Сообщение: Re: Hot Backup