Re: postgres-jdbc - Mailing list pgsql-jdbc

From mikael-aronsson
Subject Re: postgres-jdbc
Date
Msg-id 019801c52af7$d9bb0bd0$8ba7e551@w128mtec
Whole thread Raw
In response to postgres-jdbc  (aparna <aparna@chintech.org>)
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: aparna
Date:
Subject: postgres-jdbc
Next
From: "Chris Smith"
Date:
Subject: Re: postgres-jdbc