Re: Restrict user to create only one db with a specific name

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: Restrict user to create only one db with a specific name
Дата
Msg-id 20200308163059.GA22585@hjp.at
обсуждение исходный текст
Ответ на Re: Restrict user to create only one db with a specific name  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
On 2020-03-06 16:39:14 -0700, David G. Johnston wrote:
> On Fri, Mar 6, 2020 at 4:28 PM Tiffany Thang <tiffanythang@gmail.com> wrote:
>     Is there a way in PostgreSQL 12 to restrict user to creating a database
>     with a specific database name?
[...]
> Why does userA need create database privileges?

Not speaking for the OP, but:

Some test frameworks (e.g. the one included in Django) like to create
their own test database to ensure that it only contains the test data.
So if you are using one of these as intended the user running the tests
needs to be able to create and drop databases.

If you are running a tests from multiple projects against the same
cluster, it might be a good idea to ensure that each job can only create
(and drop) their own test database and not those of other jobs (or -
worse - the production database).

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: Sándor Daku
Дата:
Сообщение: Re: Another INSTEAD OF TRIGGER question
Следующее
От: PegoraroF10
Дата:
Сообщение: How to discover what table is