SET ROLE and reserved roles

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: SET ROLE and reserved roles
Date: 2016-04-13 08:58:59
Message-ID: 570E0A53.5040202@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I observe this:

postgres=# SET ROLE TO NONE;
SET

postgres=# SET ROLE TO nonexistent;
ERROR: role "nonexistent" does not exist

postgres=# SET ROLE TO pg_signal_backend;
ERROR: invalid value for parameter "role": "pg_signal_backend"

Is that behavior deliberate? Might it be better to handle the case
specially much as setting to "none" works? Such as:

ERROR: cannot set to reserved role "pg_signal_backend"

Sorry if I have missed any discussion where such a choice was deliberately
made.

Thanks,
Amit

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2016-04-13 09:23:12 [patch] \crosstabview documentation
Previous Message Simon Riggs 2016-04-13 08:38:39 Re: Pglogical questions and problems