SET ROLE and reserved roles - Mailing list pgsql-hackers

From Amit Langote
Subject SET ROLE and reserved roles
Date
Msg-id 570E0A53.5040202@lab.ntt.co.jp
Whole thread Raw
Responses Re: SET ROLE and reserved roles  (Michael Paquier <michael.paquier@gmail.com>)
Re: SET ROLE and reserved roles  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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






pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Pglogical questions and problems
Next
From: Christoph Berg
Date:
Subject: [patch] \crosstabview documentation