Re: postgres-jdbc

From: "mikael-aronsson" <mikael-aronsson(at)telia(dot)com>
To: "aparna" <aparna(at)chintech(dot)org>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: postgres-jdbc
Date: 2005-03-17 13:47:24
Message-ID: 019801c52af7$d9bb0bd0$8ba7e551@w128mtec
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)chintech(dot)org>
To: <pgsql-jdbc(at)postgresql(dot)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(at)chintech(dot)org
> --regards aparna
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Roland Walter 2005-03-17 13:56:10 Re: postgres-jdbc
Previous Message aparna 2005-03-17 13:40:18 postgres-jdbc