Re: [GENERAL] Missing variable "role" in "pg_settings"?

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Missing variable "role" in "pg_settings"?
Date: 2005-11-05 20:28:19
Message-ID: 436D15E3.4030309@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers pgsql-general

Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
>
>>The per-session variable "role" is not shown when
>>doing "select pg_settings". It is, however, possible
>>to set it using "set role ...", and to query it using
>>"show role". Is this per design, or is this a bug.
>
> It's marked NO_SHOW_ALL in guc.c. I'm not sure about the reasoning
> for this --- session_authorization is the same way, and we probably
> just copied that when we made the role variable; but I've forgotten
> what the rationale for marking session_authorization as NO_SHOW_ALL
> was.

Isn't "set session authorization <user>" basically the same
as "set role <user>" (Not from an implemenation standpoint, but
from the standpoint of the user), with "set role" being more generic,
because it's also allowed for non-superusers? In that case, omiting
"session_authorization" while showing "role" would make sense..

And, additionally, "alter user <user> set session authorization <other
user>" doesn't seem to make much sense...

>>In case omiting role from pg_settings is per design,
>>how could pgadmin find _all_ variables that can be set per user?
>
> If this is an argument for not having *any* NO_SHOW_ALL variables,
> I think the answer will be "no".
I don't quite understand what the "no" refers to...
I think Andreas Pflug now commited a patch that manually adds
"role" to the list of per-user variables in pgadmin3 - but in the
long run, there should be a better solution...

greetings, Florian Pflug

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2005-11-05 20:45:41 Re: [GENERAL] Duplicate Row Removal
Previous Message Berend Tober 2005-11-05 19:09:40 Re: Duplicate Row Removal

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2005-11-05 20:45:41 Re: [GENERAL] Duplicate Row Removal
Previous Message John Sidney-Woollett 2005-11-05 19:31:14 Re: joining a query with a select count(*)