Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UA3TX-0003uQ-36 for pgsql-admin@arkaria.postgresql.org; Mon, 25 Feb 2013 19:12:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UA3TW-0000ow-DP for pgsql-admin@arkaria.postgresql.org; Mon, 25 Feb 2013 19:12:34 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UA3TV-0000oo-K9; Mon, 25 Feb 2013 19:12:33 +0000 Received: from proofpoint2.mail.rice.edu ([128.42.201.101]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UA3TS-0005Gt-ER; Mon, 25 Feb 2013 19:12:32 +0000 Received: from pps.filterd (proofpoint2 [127.0.0.1]) by proofpoint2.mail.rice.edu (8.14.5/8.14.5) with SMTP id r1PCxsDO008456; Mon, 25 Feb 2013 13:12:23 -0600 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by proofpoint2.mail.rice.edu with ESMTP id 1ant26rc45-1; Mon, 25 Feb 2013 13:12:23 -0600 Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id CBB9B4C01B3; Mon, 25 Feb 2013 13:12:23 -0600 (CST) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id CA1074C01B1; Mon, 25 Feb 2013 13:12:23 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id j4hGWFjuGSJF; Mon, 25 Feb 2013 13:12:23 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh11.mail.rice.edu (Postfix) with ESMTP id AAAD54C01A1; Mon, 25 Feb 2013 13:12:23 -0600 (CST) Received: by aart.rice.edu (Postfix, from userid 18612) id 9B4DE100630; Mon, 25 Feb 2013 13:12:23 -0600 (CST) Date: Mon, 25 Feb 2013 13:12:23 -0600 From: "ktm@rice.edu" To: Frank Cavaliero Cc: Adrian Klaver , pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] Use, Set Catalog and JDBC questions Message-ID: <20130225191223.GL19940@aart.rice.edu> References: <512BAE9A.2000401@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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