Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux