Re: Allow placeholders in ALTER ROLE w/o superuser
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Steve Chavez <steve@supabase.io>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-07-19T16:53:39Z
Lists: pgsql-hackers
On Tue, Jul 19, 2022 at 12:55:14AM -0500, Steve Chavez wrote: > Taking your options into consideration, for me the correct behaviour should > be: > > - The ALTER ROLE placeholder should always be stored with a PGC_USERSET > GucContext. It's a placeholder anyway, so it should be the less restrictive > one. If the user wants to define it as PGC_SUSET or other this should be > done through a custom extension. > - When an extension claims the placeholder, we should check the > DefineCustomXXXVariable GucContext with PGC_USERSET. If there's a match, > then the value gets applied, otherwise WARN or ERR. > The role GUCs get applied at login time right? So at this point we can > WARN or ERR about the defined role GUCs. > > What do you think? Hm. I would expect ALTER ROLE to store the PGC_SUSET context when executed by a superuser or a role with privileges via pg_parameter_acl. Storing all placeholder GUC settings as PGC_USERSET would make things more restrictive than they are today. For example, it would no longer be possible to apply any ALTER ROLE settings from superusers for placeholders that later become custom GUCS. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove extra regress check arguments from test_pg_db_role_setting
- 529da086ba7f 16.0 landed
-
meson: Add 'running' test setup, as a replacement for installcheck
- afdd9f7f0e00 16.0 landed
-
Add USER SET parameter values for pg_db_role_setting
- 096dd80f3ccc 16.0 landed
-
Fix sloppy cleanup of roles in privileges.sql.
- b62303794efd 16.0 cited
-
Drop test user when done with it.
- f31111bbe81d 12.0 cited
-
GRANT rights to CURRENT_USER instead of adding roles
- 6928484bda45 9.6.0 cited
-
Clean up roles from roleattributes test
- 072710dff3ee 9.6.0 cited
-
Make repeated 'make installcheck' runs work
- b22b77068380 9.5.0 cited