pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@gmail.com>
To: Frank Cavaliero <fcavalie@us.ibm.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Use, Set Catalog and JDBC questions
Date: Mon, 25 Feb 2013 11:04:13 -0800
Message-ID: <512BB5AD.3080505@gmail.com> (raw)
In-Reply-To: <OF634F0290.B126088B-ON85257B1D.00681DCA-85257B1D.0068631C@us.ibm.com>
References: <OF452CD15F.978F2C6E-ON85257B1D.0063F9C0-85257B1D.00653F7F@us.ibm.com>
	<512BAE9A.2000401@gmail.com>
	<OF634F0290.B126088B-ON85257B1D.00681DCA-85257B1D.0068631C@us.ibm.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (12+ messages)  latest in thread

Message-ID: <512BB5AD.3080505@gmail.com>
Permalink:  ../512BB5AD.3080505@gmail.com/
Also on:    postgresql.org/message-id/512BB5AD.3080505@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: adrian.klaver@gmail.com, fcavalie@us.ibm.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Use, Set Catalog and JDBC questions
  In-Reply-To: <512BB5AD.3080505@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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