Search Postgresql Archives

Re: Use, Set Catalog and JDBC questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adrian,

Thanks a lot!    I will certainly look into the multiple datasources as an option.


-Frank


 


From: Adrian Klaver <adrian.klaver@xxxxxxxxx>
To: Frank Cavaliero/Boston/IBM@IBMUS
Cc: pgsql-admin@xxxxxxxxxxxxxx, pgsql-general@xxxxxxxxxxxxxx
Date: 02/25/2013 02:16 PM
Subject: Re: 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@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.klaver@xxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux