I can't get the database's list - Mailing list pgsql-jdbc

From miguel manzano
Subject I can't get the database's list
Date
Msg-id 1276050127.8267.6.camel@localhost
Whole thread Raw
Responses Re: I can't get the database's list  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
I try to obtain the database's list in my instalation but when I use :

 System.out.println("Driver : ");
         System.out.println("   " + md.getDatabaseProductName() );
         System.out.println("   " + md.getDatabaseProductVersion() );
         ResultSet catalogRs = md.getCatalogs();

         while ( catalogRs.next() ){

            System.out.println("Catalog " + catalogRs.getString(1));
            ResultSet tableRs =
md.getTables(catalogRs.getString(1),"%","%",(String []) null);
            }
        }
I just got only the name of the database at I have conected but the
another databases didn't figure in the list.
But if I use :
psql template1 -c "select datname from pg_catalog.pg_database"
I can see all databases in my machine.
I have read documentation but I haven't found where is the problem
please I need help about this topic
Thanks for all
Miguel Manzano
miguel.miguelmanzano@gmail.com-


pgsql-jdbc by date:

Previous
From: Altaf Malik
Date:
Subject: IllegalArgumentException in batch execution
Next
From: Kris Jurka
Date:
Subject: Re: I can't get the database's list