Re: Use, Set Catalog and JDBC questions

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Use, Set Catalog and JDBC questions
Дата
Msg-id 512BB5AD.3080505@gmail.com
обсуждение исходный текст
Ответ на Re: Use, Set Catalog and JDBC questions  (Frank Cavaliero <fcavalie@us.ibm.com>)
Ответы Re: Use, Set Catalog and JDBC questions
Re: Use, Set Catalog and JDBC questions
Список pgsql-general
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@gmail.com


В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Use, Set Catalog and JDBC questions
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Use, Set Catalog and JDBC questions