From: Chris Smith <cdsmith@twu.net>
To: Steven Bell <sfbell@keasdesign.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Listing Database
Date: Fri, 2 Jul 2004 12:33:27 -0600
Message-ID: <01da01c46063$11c9e790$6f00000a@KYA> (raw)
References: <40E5A7B5.6060707@keasdesign.net>
Steven Bell wrote:
> I am starting out with the PostgreSQL JDBC and I was wondering how to
> get a list of the databases. I know from the psql command line, \l
> will do it. But how about within a Java app?
Just a guess, but you might connect to a database that you know is there
(template1?) and call DatabaseMetaData.getCatalogs(). Does that work?
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: cdsmith@twu.net, sfbell@keasdesign.net
Subject: Re: Listing Database
In-Reply-To: <01da01c46063$11c9e790$6f00000a@KYA>
References: <40E5A7B5.6060707@keasdesign.net> <01da01c46063$11c9e790$6f00000a@KYA>
* 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