Re: Programatically switching database

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: ow <oneway_111(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Programatically switching database
Date: 2003-11-15 10:11:47
Message-ID: Pine.LNX.4.44.0311151110140.5327-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Yasir Malik 2003-11-15 15:18:08 Getting last insert value
Previous Message ow 2003-11-15 04:36:16 Programatically switching database