pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedSwitching database inside current connection
3+ messages / 3 participants
[nested] [flat]
* Switching database inside current connection
@ 2006-09-28 04:17 Jeff Madison <jeff@madisonfam.net>
2006-09-28 04:27 ` Re: Switching database inside current connection Kris Jurka <books@ejurka.com>
2006-09-28 14:33 ` Re: Switching database inside current connection Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 2 replies; 3+ messages in thread
From: Jeff Madison @ 2006-09-28 04:17 UTC (permalink / raw)
To: pgsql-jdbc
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.
I'm running server version 7.3 and the coinciding JDBC driver version.
Jeff
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Switching database inside current connection
2006-09-28 04:17 Switching database inside current connection Jeff Madison <jeff@madisonfam.net>
@ 2006-09-28 04:27 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kris Jurka @ 2006-09-28 04:27 UTC (permalink / raw)
To: Jeff Madison <jeff@madisonfam.net>; +Cc: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Switching database inside current connection
2006-09-28 04:17 Switching database inside current connection Jeff Madison <jeff@madisonfam.net>
@ 2006-09-28 14:33 ` Scott Marlowe <smarlowe@g2switchworks.com>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2006-09-28 14:33 UTC (permalink / raw)
To: Jeff Madison <jeff@madisonfam.net>; +Cc: pgsql-jdbc
On Wed, 2006-09-27 at 23:17, 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.
>
> I'm running server version 7.3 and the coinciding JDBC driver version.
If you can move away from individual databases to multiple schemas in
one database, then your problem would be solved. Schema support was
initially added in 7.3, but the tools needed for examining schemas and
such were not quite done all the way back then. Upgrading to 7.4 at
least makes dealing with schemas a little easier, and if you're
upgrading to 7.4, might as well go all the way and get 8.1.4. 7.3 is on
the very tail end of what's considered "supported".
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-09-28 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-28 04:17 Switching database inside current connection Jeff Madison <jeff@madisonfam.net>
2006-09-28 04:27 ` Kris Jurka <books@ejurka.com>
2006-09-28 14:33 ` Scott Marlowe <smarlowe@g2switchworks.com>
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