Re: Disable script execution in server level when updating via grids

Поиск
Список
Период
Сортировка
От Filip Sedlak
Тема Re: Disable script execution in server level when updating via grids
Дата
Msg-id 6a1995fe-a2e5-4c47-8fea-520cd56e6925@sedlakovi.org
обсуждение исходный текст
Ответ на Disable script execution in server level when updating via grids  (arun chirappurath <arunsnmimt@gmail.com>)
Список pgsql-general
I'd use different users or roles for that - one with more restricted 
rights. I'm not sure how to do it in your specific client.

In general, your user can be granted be granted read-only access and a 
more powerful role to which it can switch explicitly.

mydb=> CREATE TABLE x (id INT);
ERROR:  permission denied for schema public
LINE 1: CREATE TABLE x (id INT);
                      ^
mydb=> SET ROLE powerful;
SET
mydb=> CREATE TABLE x (id INT);
CREATE TABLE

In PostgreSQL up to 15, you have to set "NOINHERIT" to your user so you 
don't automatically get all the privileges on login. In 16, you can set 
INHERIT FALSE when granting the role.

--
Filip Sedlák



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

Предыдущее
От: arun chirappurath
Дата:
Сообщение: Disable script execution in server level when updating via grids
Следующее
От: Noel Jones
Дата:
Сообщение: Re: Invalid Parent Index Issue Will Not Resolve Despite Multiple Attempts To Fix