Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: [GENERAL] Missing variable "role" in "pg_settings"?
Date: 2005-12-04 04:22:10
Message-ID: 200512040422.jB44MAq11954@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-general
Based on this email, should we be showing ROLE from SHOW ALL?

---------------------------------------------------------------------------

Florian G. Pflug wrote:
> 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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgadmin-hackers by date

Next:From: Tom LaneDate: 2005-12-04 04:35:26
Subject: Re: [GENERAL] Missing variable "role" in "pg_settings"?
Previous:From: Andreas PflugDate: 2005-12-03 02:26:43
Subject: Re: 1.4.1 Release

pgsql-general by date

Next:From: Tom LaneDate: 2005-12-04 04:29:43
Subject: Re: New.* and old.* as function arguments within rules
Previous:From: Tom LaneDate: 2005-12-04 03:33:03
Subject: Re: int to inet conversion

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group