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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "bossartn(at)amazon(dot)com" <bossartn(at)amazon(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail
Date: 2016-07-11 23:12:49
Message-ID: 15324.1468278769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>> bossartn(at)amazon(dot)com <javascript:;> writes:
>>> 2. As foo, execute "alter role foo set role = 'foo'"

> I'm at a loss to understand what this does when it isn't broken. Assuming
> valid grants does the user become the assigned role upon session startup?

As written it does nothing much. But "SET ROLE" is defined by the SQL
standard, and what I'd expect this to do is execute an implicit SET ROLE
at login. Whether that's a good idea is pretty debatable, though, thus
my question whether we'd not be better off to forbid this.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2016-07-11 23:18:06 Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail
Previous Message David G. Johnston 2016-07-11 23:03:22 Re: BUG #14242: Role with a setconfig "role" setting to a nonexistent role causes pg_upgrade to fail