Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 60A59AB594F for ; Thu, 8 Dec 2011 23:41:14 -0400 (AST) Received: from news.hub.org ([200.46.204.72]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RYrKi-0002Bo-Si for pgsql-jdbc@postgresql.org; Fri, 09 Dec 2011 03:41:14 +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 pB93exYh007019 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 pB93M6xm091478 for pgsql-jdbc@postgresql.org; Thu, 8 Dec 2011 23:22:06 -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:22:01 -0800 (PST) Organization: http://groups.google.com Lines: 45 Message-ID: <0899e710-4c63-4f38-9c4e-a7540ed0c27e@a31g2000pre.googlegroups.com> 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: a31g2000pre.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/46 X-Sequence-Number: 22500 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 not sure my reply was sent previously so will try again ResultSet rs =3D meta.getTables(null, null, null, null); ResultSetMetaData rsmd =3D rs.getMetaData(); 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[]) was expecting 10 not 5 columns and the names of the result columns for the metadata methods to be independent in terms of how RDBMS vendors may hold their system catalog. assuming JDBC result column names are as per the docs UPPER CASE.