Re: Something I don't understand with the use of schemas - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Something I don't understand with the use of schemas
Date
Msg-id 1948.1134424845@sss.pgh.pa.us
Whole thread Raw
In response to Re: Something I don't understand with the use of schemas  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Re: Something I don't understand with the use of schemas  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc.
> That would make it easy to do 'normal' work with a non-superuser
> account.

You can already do most of this with SET/RESET ROLE:

regression=# create user tgl;
CREATE ROLE
regression=# create user admin createrole;
CREATE ROLE
regression=# grant admin to tgl;
GRANT ROLE
regression=# \c - tgl
You are now connected as new user "tgl".
regression=> create user boo;
ERROR:  permission denied to create role
regression=> set role admin;
SET
regression=> create user boo;
CREATE ROLE
regression=> reset role;
RESET
regression=> create user bar;
ERROR:  permission denied to create role
regression=>

        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: buildfarm off the air pro tem
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [Bug] Server Crash, possible security exploit, where to send security report?