X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 51344D1B389 for ; Fri, 2 Jul 2004 15:35:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01943-09 for ; Fri, 2 Jul 2004 18:35:47 +0000 (GMT) Received: from andrea.pop4.net (skidway.pop4.net [216.234.109.11]) by svr1.postgresql.org (Postfix) with SMTP id 7D61BD1B383 for ; Fri, 2 Jul 2004 15:35:41 -0300 (ADT) Received: (qmail 24638 invoked by uid 1008); 2 Jul 2004 18:35:39 -0000 Received: from cdsmith@twu.net by www.pop4.net with qmail-scanner-0.96 (uvscan: v4.1.40/v4156. . Clean. Processed in 0.786851 secs); 02 Jul 2004 18:35:39 -0000 Received: from unknown (HELO KYA) (69.171.228.185) by 0 with SMTP; 2 Jul 2004 18:35:38 -0000 Message-ID: <01da01c46063$11c9e790$6f00000a@KYA> From: "Chris Smith" To: "Steven Bell" , References: <40E5A7B5.6060707@keasdesign.net> Subject: Re: Listing Database Date: Fri, 2 Jul 2004 12:33:27 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/17 X-Sequence-Number: 10401 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