| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | Jeff Madison <jeff(at)madisonfam(dot)net> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Switching database inside current connection |
| Date: | 2006-09-28 04:27:57 |
| Message-ID: | Pine.BSO.4.63.0609272325480.2117@leary2.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paesold | 2006-09-28 11:13:37 | Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails |
| Previous Message | Jeff Madison | 2006-09-28 04:17:18 | Switching database inside current connection |