Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, "bossartn\@amazon.com" <bossartn@amazon.com>, "pgsql-bugs\@postgresql.org" <pgsql-bugs@postgresql.org>
Date: 2016-07-11T23:18:06Z
Lists: pgsql-bugs
>>>>> "David" == David G Johnston <david.g.johnston@gmail.com> writes:

 >> > 2. As foo, execute "alter role foo set role = 'foo'"

 David> I'm at a loss to understand what this does when it isn't broken.

ALTER ROLE foo SET role = bar;   will have the effect that when 'foo'
logs in, it will behave as if foo had immediately executed the command
SET ROLE bar;

I don't think this is documented but it has obvious uses.

-- 
Andrew (irc:RhodiumToad)


Commits

  1. Fix some inappropriately-disallowed uses of ALTER ROLE/DATABASE SET.