pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Frank Cavaliero <fcavalie@us.ibm.com>
Cc: Adrian Klaver <adrian.klaver@gmail.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 13:12:23 -0600
Message-ID: <20130225191223.GL19940@aart.rice.edu> (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 Mon, Feb 25, 2013 at 01:57:11PM -0500, 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.
> 
> Thanks,
> Frank
> 

Hi Frank,

The "USE xxx;' is a non-standard MySQL extension to the SQL language. This
functionality is not available at the SQL layer and must be supported by
the connection application itself, I think. For example, you can use
"\c xxx" in psql to perform that function. If JDBC does not support it
natively, you would need to open a new connection to the new database.

Regards,
Ken


-- 
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: <20130225191223.GL19940@aart.rice.edu>
Permalink:  ../20130225191223.GL19940@aart.rice.edu/
Also on:    postgresql.org/message-id/20130225191223.GL19940@aart.rice.edu

 · 

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: ktm@rice.edu, fcavalie@us.ibm.com, adrian.klaver@gmail.com, pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Use, Set Catalog and JDBC questions
  In-Reply-To: <20130225191223.GL19940@aart.rice.edu>

* 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