Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 7A2B9AB5950 for ; Thu, 8 Dec 2011 23:41:15 -0400 (AST) Received: from news.hub.org ([200.46.204.72]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RYrKi-0002Bp-Vy for pgsql-jdbc@postgresql.org; Fri, 09 Dec 2011 03:41:15 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id pB93exYj007019 for ; Thu, 8 Dec 2011 23:40:59 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id pB93JFXB088305 for pgsql-jdbc@postgresql.org; Thu, 8 Dec 2011 23:19:15 -0400 (AST) (envelope-from news) From: the6campbells X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: getTables not returning 10 columns etc Date: Thu, 8 Dec 2011 19:17:26 -0800 (PST) Organization: http://groups.google.com Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Complaints-To: groups-abuse@google.com Complaints-To: groups-abuse@google.com Injection-Info: y6g2000prc.googlegroups.com; posting-host=99.241.107.183; posting-account=hKFGKAkAAAB4U5rGhRuB_p6PSIbpGEph User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729),gzip(gfe) To: pgsql-jdbc@postgresql.org X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201112/45 X-Sequence-Number: 22499 On Dec 8, 9:47=A0pm, p...@fastcrypt.com (Dave Cramer) wrote: > On Thu, Dec 8, 2011 at 8:10 PM, the6campbells w= rote: > > Is there any documentation that list for the all get* methods etc > > where it is by design intent that the PG JDBC driver may not have a > > result set with all the columns as documented in the JDBC docs? > > > For example getTables has 10 columns and the PG driver returns 5 or > > the documentation uses upper case names such as TABLE_CAT but PG > > driver returns lower case names etc. > > Which documentation ? By default postgres uses lower case names. > > You would have to provide a test case for use to diagnose this further. > > > > > -- > > Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org) > > To make changes to your subscription: > >http://www.postgresql.org/mailpref/pgsql-jdbc > > -- > Sent via pgsql-jdbc mailing list (pgsql-j...@postgresql.org) > To make changes to your subscription:http://www.postgresql.org/mailpref/p= gsql-jdbc re documentation http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html re example Server: 9.0.4 Driver: PostgreSQL Native Driver: PostgreSQL 9.1 JDBC3 (build 901) ResultSet rs =3D meta.getTables(null, null, null, null); ResultSetMetaData rsmd =3D rs.getMetaData(); System.out.println(rsmd.getColumnCount()); This will print the value of 5 not 10. Change the code to for (int i =3D 1; i <=3D rsmd.getColumnCount(); i++) { System.out.println(rsmd.getColumnName(i)); } http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#get= Tables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[]) returns names as follows was expecting upper case names similar to rs.getString("TABLE_NAME") table_cat table_schem table_name table_type remarks