Database bar

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Database bar
Date: 2011-05-05 15:25:03
Message-ID: 4DC2C14F.7010106@falter.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Aloha!

I have had a closer look at the status of the "database bar" or "database selector" in the sql editor in v1.12.3 and v1.14beta1.
Testing on Win XP Pro with pg 8.4 on Debian Lenny.
Sorry for nagging, but that is my role here ...

In 1.12.3:
The bug I reported previously is still there. The username is not picked as it should. (Guillaume could not reproduce the issue, maybe someone else
can contribute a test?)
http://archives.postgresql.org/pgadmin-support/2011-01/msg00042.php

In 1.14:
- Same bug as above.

- There is a new feature: the rolename. This effectively issues a command of the form:
SET ROLE TO myrole;
after connecting with the chosen username. The database bar then reads accordingly:
"mydb on myuser(at)myserver:port ~myrole"

However!
- Most users will not understand the dialog. Why does it ask for a "Username" and a "Rolename"? It certainly took me some time to figure it out.
Nothing in the help yet.
- What if someone issues one of the following commands?
RESET role;
SET ROLE TO my_other_role;
See for yourself:
SELECT current_user, session_user;
The display in the database bar remains unchanged, rendering it wrong / misleading.
Changing to another connection and changing back does not change the situation.
This could get quite hazardous. Imagine a command in the mistaken belief it would be executed by the displayed role ...

If we keep this functionality the database bar would have to show the currently active role IMHO.
Otherwise I would propose to drop it altogether to keep it safe and simple.

- Also, the "database bar" is too narrow to show the whole connection string, cutting off the relevant part at the end. See attached screenshot.

Regards
Erwin

Attachment Content-Type Size
image/jpeg 31.2 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-05-05 20:50:11 Re: Database bar
Previous Message Dave Page 2011-05-05 13:39:21 Re: Warning about PNGs