X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 53A7C56662 for ; Thu, 17 Mar 2005 13:52:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38903-07 for ; Thu, 17 Mar 2005 13:52:22 +0000 (GMT) Received: from av1-1-sn1.fre.skanova.net (av1-1-sn1.fre.skanova.net [81.228.11.107]) by svr1.postgresql.org (Postfix) with ESMTP id CFD615665D for ; Thu, 17 Mar 2005 13:52:20 +0000 (GMT) Received: by av1-1-sn1.fre.skanova.net (Postfix, from userid 502) id B5D2037EB7; Thu, 17 Mar 2005 14:52:23 +0100 (CET) Received: from smtp3-1-sn1.fre.skanova.net (smtp3-1-sn1.fre.skanova.net [81.228.11.163]) by av1-1-sn1.fre.skanova.net (Postfix) with ESMTP id A373F37E4C; Thu, 17 Mar 2005 14:52:23 +0100 (CET) Received: from w128mtec (h139n4fls31o1096.telia.com [81.229.167.139]) by smtp3-1-sn1.fre.skanova.net (Postfix) with SMTP id 2B94037E62; Thu, 17 Mar 2005 14:47:23 +0100 (CET) Message-ID: <019801c52af7$d9bb0bd0$8ba7e551@w128mtec> From: "mikael-aronsson" To: "aparna" , References: <423988C2.6090407@chintech.org> Subject: Re: postgres-jdbc Date: Thu, 17 Mar 2005 14:47:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/159 X-Sequence-Number: 12551 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" To: 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