Re: Programatically switching database - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Programatically switching database
Date
Msg-id Pine.LNX.4.44.0311151110140.5327-100000@peter.localdomain
Whole thread Raw
In response to Programatically switching database  (ow <oneway_111@yahoo.com>)
List pgsql-sql
ow writes:

> Is there a way to programatically switch conn1 to use db2 without doing
> disconnect-from-db1-connect-to-db2? Something like what "\c" does but to
> be used independently from psql? I need this to be able to reuse a pool
> of connections to db1 for actions on db1, db2 ... dbn.

Nothing prevents you from keeping the connection to db1 open when you open
a connection to db2.  By the way, psql's "\c" command does exactly
disconnect-from-db1-connect-to-db2.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-sql by date:

Previous
From: ow
Date:
Subject: Programatically switching database
Next
From: Yasir Malik
Date:
Subject: Getting last insert value