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

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: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers

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?)

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"

- 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.


Attachment: database_bar_in_v1_14.jpg
Description: image/jpeg (31.2 KB) (inlined above)


pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2011-05-05 20:50:11
Subject: Re: Database bar
Previous:From: Dave PageDate: 2011-05-05 13:39:21
Subject: Re: Warning about PNGs

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