Set role for UI-based operations

From: David Bolen <db3l(dot)net(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Set role for UI-based operations
Date: 2009-09-15 22:23:49
Message-ID: m2ocpbdeyy.fsf@valheru.db3l.homeip.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I've got some user roles that have limited rights but are also part of an
administration group with additional rights that they can "set role" for
when needed. The admin roles themselves are not login roles.

Is there a way in pgadmin to enable a role (other than the original
login role) to be used in whatever underlying database session (via, I
presume, an implicit 'set role' operation) gets used for UI based
operations?

Ideally it would be something enabled when needed (via a right click
menu or something), but even being part of the server configuration
would be useful, as I could maintain two server entries - one with and
one without the admin role enabled.

Right now based on experimentation it would appear that if I open up a SQL
window, issue the "set role" manually, and then make sure that the SQL
window in question remains the last such window I have used, that the UI
uses that existing session for its work and runs under that role. But if
I open up any other SQL windows, or even just switch to a different one
for a quick query, the UI will fail its operations. So it feels a little
fragile.

I'm guessing the UI is trying to reuse an existing session, but it
would be better if I could have it use its own session, or at least
pin it to a session where I enabled the role I need.

Depending on client system, I'm currently using pgadmin 1.8.1-1.8.4.

Thanks.

-- David

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2009-09-16 05:09:53 Re: [pgadmin-support] Possible simple enhancement
Previous Message Guillaume Lelarge 2009-09-15 16:47:24 Re: [pgadmin-support] Possible simple enhancement