From: mikael-aronsson <mikael-aronsson@telia.com>
To: aparna <aparna@chintech.org>
To: pgsql-jdbc@postgresql.org
Subject: Re: postgres-jdbc
Date: Thu, 17 Mar 2005 14:47:24 +0100
Message-ID: <019801c52af7$d9bb0bd0$8ba7e551@w128mtec> (raw)
References: <423988C2.6090407@chintech.org>
Hi !
The meta data gives all information you need about the tablöe, for example
to get column names you could:
ResultSet rs = ....
ResultSetMetaData meta = rs.getMetaData();
int count = meta.getColumnCount();
String[] cols = new String[ count];
int i;
for( i = 1; i <= count; i++)
cols[ i - 1] = meta.getColumnLabel( i);
I am not sure if this is what you want, if it is this all part of the JDBC
standard so just look it up in the JDBC docs.
Mikael
----- Original Message -----
From: "aparna" <aparna@chintech.org>
To: <pgsql-jdbc@postgresql.org>
Sent: Thursday, March 17, 2005 2:40 PM
Subject: [JDBC] postgres-jdbc
> hi
> I'm a computer student.
> as part of my mini project i'm working on the project GUI frontend for
> postgres.
>
> i'm doing it in Java.
> Is there any way to retrieve the structure of a table from the java
> program and display it?
>
> I tried to execute the command \d using the program.
> it worked.
> But i couldn't get the result.
> Can anybody help?
> Please send mail to
> aparna@chintech.org
> --regards aparna
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
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: mikael-aronsson@telia.com, aparna@chintech.org
Subject: Re: postgres-jdbc
In-Reply-To: <019801c52af7$d9bb0bd0$8ba7e551@w128mtec>
References: <423988C2.6090407@chintech.org> <019801c52af7$d9bb0bd0$8ba7e551@w128mtec>
* 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