From: | miguel manzano <miguel(dot)miguelmanzano(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | I can't get the database's list |
Date: | 2010-06-09 02:22:07 |
Message-ID: | 1276050127.8267.6.camel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)miguelmanzano(at)gmail(dot)com-
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2010-06-09 06:09:17 | Re: I can't get the database's list |
Previous Message | Altaf Malik | 2010-06-08 16:12:30 | IllegalArgumentException in batch execution |