Re: Switching databases over JDBC/ODBC

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Switching databases over JDBC/ODBC
Date: 2009-05-30 00:07:03
Message-ID: 4A2078A7.6030204@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Bailey wrote:
> Is there an equivalent to psql's \connect database or MySQL/MS SQL's use
> database command that will work with JDBC? It doesn't seem like I should
> need to drop the connection and establish a new one just to switch
> databases.

the \connect command disconnects from the current database, and connects
to a new one, this causes a new postgres server process to be spawned to
replace the one servicing the old connection.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2009-05-30 00:14:40 Re: Switching databases over JDBC/ODBC
Previous Message Martin Gainty 2009-05-29 23:53:28 Re: Switching databases over JDBC/ODBC