Re: Listing Database - Mailing list pgsql-jdbc

From Chris Smith
Subject Re: Listing Database
Date
Msg-id 01da01c46063$11c9e790$6f00000a@KYA
Whole thread Raw
In response to Listing Database  (Steven Bell <sfbell@keasdesign.net>)
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: Steven Bell
Date:
Subject: Listing Database
Next
From: Franco Bruno Borghesi
Date:
Subject: Re: Listing Database