How to configure pgAdmin III to open default database and select tables node on startup?

冷暖自知 提交于 2019-12-23 07:46:44

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/15012452/how-to-configure-pgadmin-iii-to-open-default-database-and-select-tables-node-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!