From: miguel manzano <miguel.miguelmanzano@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: I can't get the database's list
Date: Tue, 08 Jun 2010 22:22:07 -0400
Message-ID: <1276050127.8267.6.camel@localhost> (raw)
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-
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: miguel.miguelmanzano@gmail.com
Subject: Re: I can't get the database's list
In-Reply-To: <1276050127.8267.6.camel@localhost>
References: <1276050127.8267.6.camel@localhost>
* 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