From: | Frank Cavaliero <fcavalie(at)us(dot)ibm(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Subject: | Re: [GENERAL] Use, Set Catalog and JDBC questions |
Date: | 2013-02-25 19:21:25 |
Message-ID: | OF6F4F651B.D28C08CE-ON85257B1D.006A7107-85257B1D.006A9B1B@us.ibm.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
Hi Adrian,
Thanks a lot! I will certainly look into the multiple datasources as an
option.
-Frank
From:
Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To:
Frank Cavaliero/Boston/IBM(at)IBMUS
Cc:
pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Date:
02/25/2013 02:16 PM
Subject:
Re: [GENERAL] Use, Set Catalog and JDBC questions
On 02/25/2013 10:57 AM, Frank Cavaliero wrote:
> Hi Adrian,
>
> Thanks for the response. The situation is more like the following:
>
> Using the JDBC driver, I connect to database TEST1 and immediately,
> without having to pass username credentials again, I want to use
> database TEST2. In MySQL, you can simply run: use TEST2. Wondering
> if PostgreSQL has something similar.
You can do it in the psql client like this, though that will not help
with JDBC:
aklaver(at)ford:~$ psql -d test -U postgres
psql (9.0.5)
Type "help" for help.
test=# \c production
You are now connected to database "production".
production=#
I do not use the JDBC driver much, but from what I read in the link I
sent you, you can set up a non-pooling DataSource to which you can add
predefined datasources and then switch as needed.
>
> Thanks,
> Frank
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-02-25 21:30:27 | Re: Use, Set Catalog and JDBC questions |
Previous Message | John R Pierce | 2013-02-25 19:13:19 | Re: Use, Set Catalog and JDBC questions |
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Keane | 2013-02-25 19:52:19 | JDBC not returning update count from updateable view |
Previous Message | John R Pierce | 2013-02-25 19:13:19 | Re: Use, Set Catalog and JDBC questions |