The column name <col> was not found in this ResultSet

From: Zsolt Kúti <kuti(dot)zsolt(at)prolan(dot)hu>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: The column name <col> was not found in this ResultSet
Date: 2012-11-14 10:42:40
Message-ID: 20121114114240.3a649bb7@kuti-zsolt.intranet.prolan.hu
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,

In a query like this:
select * form T1 a, T2 b where a.id='xx' and a.id=b.id

calling the result set:
rs.getString("o.id")

I get:
org.postgresql.util.PSQLException: The column name o.id was not found
in this ResultSet. at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2562)
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:2405)
at
hu.prolan.emgmt.fre.service.store.impl.OrderStoreImpl.loadOrder(OrderStoreImpl.java:236)

Getting data by index is OK, just as simply using getString('id'). This
nonqualified access however cannot get to the next column with the
same name...

How can the columns accessed by qualified name?
Is it a bug?

I use:
postgresql-9.1-901.jdbc4.jar
openjdk6

Please cc to me as I am not on the list!
Thanks!

Zsolt

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2012-11-14 11:38:11 Re: Packaging of 9.2-1001 source tarball
Previous Message Tom Lane 2012-11-14 03:00:29 Re: Packaging of 9.2-1001 source tarball