From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | ALTER ROLE SET/RESET for multiple options |
Date: | 2015-12-24 20:11:00 |
Message-ID: | CAD21AoAbVNOW6HvbZde2fJbLDAC5d2Tc4qZ3HtowpghYefFeEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
ALTER ROLE SET/RESET can set/reset only one GUC parameter per one SQL today.
So when we need to set/reset multiple GUC parameter to user, it would
be burdensome work.
I'd like propose feature makes ALTER ROLE SET/RESET can set/reset
multiple options like ALTER TABLE.
ALTER USER is as well.
For example,
postgres(1)=# CREATE USER hoge_user ;
CREATE ROLE
postgres(1)=# ALTER USER hoge_user SET (log_statement = ddl,
log_min_messages = notice, application_name = 'HOGE');
ALTER ROLE
postgres(1)=# SELECT * FROM pg_db_role_setting ;
setdatabase | setrole | setconfig
-------------+---------+-------------------------------------------------------------------
0 | 16384 |
{log_statement=ddl,log_min_messages=notice,application_name=HOGE}
(1 row)
postgres(1)=# ALTER USER hoge_user RESET (log_statement, log_min_messages);
ALTER ROLE
postgres(1)=# SELECT * FROM pg_db_role_setting ;
setdatabase | setrole | setconfig
-------------+---------+-------------------------
0 | 16384 | {application_name=HOGE}
(1 row)
Attached draft v1 patch.
Please give me feedback.
Regards,
--
Masahiko Sawada
Attachment | Content-Type | Size |
---|---|---|
000_alter_role_multiple_set_v1.patch | application/octet-stream | 18.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2015-12-24 20:15:29 | Re: Spurious standby query cancellations |
Previous Message | Masahiko Sawada | 2015-12-24 19:50:16 | Re: Support for N synchronous standby servers - take 2 |