From: Kris Jurka <books@ejurka.com>
To: Jeff Madison <jeff@madisonfam.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Switching database inside current connection
Date: Wed, 27 Sep 2006 23:27:57 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0609272325480.2117@leary2.csoft.net> (raw)
In-Reply-To: <451B4CCE.7000105@madisonfam.net>
References: <451B4CCE.7000105@madisonfam.net>
On Wed, 27 Sep 2006, Jeff Madison wrote:
> I have to search multiple, identical databases on a server and am currently
> having to create a DataSource for each database on the server and then get a
> connection. How would I create a DataSource for the server and then modify
> the connnection to "switch" databases. I would like to just re-use the same
> connection for obvious reasons.
This is not possible with postgresql. You can only use the database you
initially connected to. To access parts of other database you can use
contrib/dblink, but for your purposes I think multiple connections are
required.
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, jeff@madisonfam.net
Subject: Re: Switching database inside current connection
In-Reply-To: <Pine.BSO.4.63.0609272325480.2117@leary2.csoft.net>
References: <451B4CCE.7000105@madisonfam.net> <Pine.BSO.4.63.0609272325480.2117@leary2.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox