Re: granting right to create and delete just one database

Поиск
Список
Период
Сортировка
От Chris Withers
Тема Re: granting right to create and delete just one database
Дата
Msg-id 176edf88-10e2-6838-64c0-d9b945367ba4@withers.org
обсуждение исходный текст
Ответ на Re: granting right to create and delete just one database  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: granting right to create and delete just one database  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
On 05/06/2019 09:52, Laurenz Albe wrote:
> Chris Withers wrote:
>> Is there any way to grant rights to a user such that they can drop and
>> re-create only a single database?
> No; what I'd do if I needed that is to create a SECURITY DEFINER function
> that is owned by a user with the CREATEDB privilege.
> This function can be called by a normal user that has the EXECUTE privilege
> on the function.
>
> Don't forget to "SET search_path" on such a function (as mentioned in the
> documentation).  It might also be a good idea to REVOKE EXECUTE on the
> function from PUBLIC.
Thanks, that's a great idea! Is this pattern documented anywhere as a 
complete finished thing?

cheers,

Chris




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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: granting right to create and delete just one database
Следующее
От: Tomasz Ostrowski
Дата:
Сообщение: Re: Long running query - connection and keepalives enabled but querynot canceled