Toad World® Forums

How to switch active database in postresql


#1

Is there a way to connect to other user databases within TDP when connected to a postgreSQL instance. For example \c DBNAME or \connect DBNAME like there is in psql.
Also the drop down doesn't allow to switch to other databases or show the current database like it does for other database platforms (Sybase, Sql Server, MySQL, etc.)


#2

Couple things I can think of.

  1. To change the active (foreground) datasource connection within Toad Datatpoint, simply right-click on the desired datasource connector within the Connection Manager, and choose "Make Current".
  2. You can mix and match tables from different data source platforms in the Cross-Connection Query Builder (Professional Edition of Toad Datapoint) when building a query. So, you can join together a Postgres table with a SQL Server table and an Excel spreadsheet, for example.
  3. On any workspace doc tab--especially on an editor doc tab--you can right-click and change that tab's affiliated datasource connection context, as in the screen capture below.

Hope this helps.


#3

I don't think you're getting my question. So in SQL Server you can switch between active user databases within the same connection, can the same be done in postgresql?


#4

For PostgreSQL SQL we are using an ODBC driver. How you connect would be controlled by the driver. i don't know PostgreSQL SQL well but I know i can define a connection to an IP address and leave the database blank. This will give me a connection and list all Schemas/Databases that are available. We list them as Schemas.