Re: SET ROLE and reserved roles

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET ROLE and reserved roles
Date: 2016-04-14 15:49:01
Message-ID: CA+TgmoZGYy8bovAABRy3VkwiWPVeMV2SdbHDowhgWbNWnuqxBw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 13, 2016 at 6:53 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Requiring that SET ROLE be allowed will mean that many more paths must
> be checked and adjusted, such as in all of the CreateObject statements
> and potentionally many other paths that I'm not thinking of here, not
> the least of which are all of the *existing* checks near
> get_rolespec_oid/tuple which will require additional checks for the
> CURRENT_USER case to see if the current user is a default role.

I don't get it. I think that these new roles should work just like
any other roles, except for existing at initdb time. I don't see why
they would require checking or adjusting any code-paths at all. It
would presumably have made the patch you committed smaller and
simpler. The only thing you'd need to do is (approximately) not dump
them.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-14 15:50:58 Re: Suspicious behaviour on applying XLOG_HEAP2_VISIBLE.
Previous Message Simon Riggs 2016-04-14 15:42:10 Re: Pglogical questions and problems