Re: documentation fix for SET ROLE
От | Joe Conway |
---|---|
Тема | Re: documentation fix for SET ROLE |
Дата | |
Msg-id | e7e64025-0a07-fa6d-665c-1deca762d868@joeconway.com обсуждение исходный текст |
Ответ на | Re: documentation fix for SET ROLE ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: documentation fix for SET ROLE
Re: documentation fix for SET ROLE |
Список | pgsql-hackers |
On 2/17/21 2:12 PM, David G. Johnston wrote: > On Wednesday, February 17, 2021, Bossart, Nathan <bossartn@amazon.com > <mailto:bossartn@amazon.com>> wrote: > > > postgres=# ALTER ROLE test1 SET ROLE test2; > ALTER ROLE > > > I would not have expected this to work - “role” isn’t a > configuration_parameter. Its actually cool that it does, but this doc fix > should address this oversight as well. I was surprised this worked too. But the behavior is consistent with other GUCs. In other words, when you "ALTER ROLE ... SET ..." you change the default value for the session, and therefore a RESET just changes to that value. -- login as postgres nmx=# show work_mem; work_mem ---------- 200MB (1 row) nmx=# set work_mem = '42MB'; SET nmx=# show work_mem; work_mem ---------- 42MB (1 row) nmx=# reset work_mem; RESET nmx=# show work_mem; work_mem ---------- 200MB (1 row) ALTER ROLE test1 SET work_mem = '42MB'; -- login as test1 nmx=> show work_mem; work_mem ---------- 42MB (1 row) nmx=> reset work_mem; RESET nmx=> show work_mem; work_mem ---------- 42MB (1 row) Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
Вложения
В списке pgsql-hackers по дате отправления: