10

99% of the time when I start pgAdmin III, I need to look at the tables of one specific database. It is very annoying to click through the tree every time. When I open pgAdmin, I would like it to automatically connect to my last database and expand the tree on the left and select the "tables" node.

Is that possible?

What is also annoying is when I rename a column, the tree node selection is lost and I have to open the whole tree again.

Reto Höhener
  • 5,419
  • 4
  • 39
  • 79
  • Having PgAdmin-III remember UI state between sessions and improve column renaming both sound possible, it just depends on how handy you're willing to get working with the C and wxWindows based codebase to implement the changes. AFAIK neither are possible without code changes, though you could try asking on the pgadmin mailing list. – Craig Ringer Feb 22 '13 at 04:24
  • Yes, why complain if something is free, right? I could just do it myself, I know. But sometimes it also helps to shout a little on stack overflow and let the nice people who provide this great piece of software know what could be improved. I admit I used the word 'annoying' twice in my question, but hey, if it hadn't been annoying enough, I wouldn't have taken the time to ask the question in the first place. Just in case you're one of the maintainers, let me assure you that your effort is very much appreciated. – Reto Höhener Feb 22 '13 at 15:07
  • Maintainers can be found [here](http://pgadmin.org/development/team.php). – Erwin Brandstetter Feb 22 '13 at 15:55
  • I'm not; I work on other parts of PostgreSQL, but mostly do consulting and community support and I haven't touched PgAdmin-III's codebase. – Craig Ringer Feb 23 '13 at 03:30

2 Answers2

7

There is a related option: Restore env. It's on by default.

Open the context menu for a (closed) connection and go to the "Advanced" tab. I quote the manual of pgAdmin 1.16 here:

The “Restore env?” option determines whether or not pgAdmin will attempt to restore the browser environment when you reconnect to this server. If you regularly use different databases on the same server you might want to turn this option off.

It doesn't pin down one particular state for ever, but reopens where you left. Since you are in the same spot 99% of the time, that should work just fine for you.

Your second issue (browser losing focus after DDL change) is a bug of the current version for all I know.

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
  • Fantastastic, you're my hero. Thanks a lot. Honestly nowadays I just cannot be bothered anymore to read software manuals (language/library/framework references yes). I'd never have guessed what "Restore env" could possibly mean. Also, why isn't this setting on by default!? Anyway, I'm happy now. – Reto Höhener Feb 22 '13 at 14:59
  • @Zalumon: It means "restore environment", obviously, and it is on by default (as stated in my answer). – Erwin Brandstetter Feb 22 '13 at 15:11
  • Wasn't on for me - can't prove it, though. Also can't prove that I didn't accidentally uncheck it... Thanks again. – Reto Höhener Feb 22 '13 at 15:34
  • @Zalumon: Welcome. :) If you want to find out, create a new "server" (plug symbol) and see if the check box is on by default in the dialog. – Erwin Brandstetter Feb 22 '13 at 15:39
0

An update for the current version:

In pgAdmin 4, if you disconnect from the server and go to the advanced tab you can enter the name of the database in the "DB Restriction" field. This will populate the navigation list with only those databases in future connects.

Nick
  • 305
  • 1
  • 2
  • 5