org.postgresql.util.PSQLException Column name candidates.id wasn't found in the ResultSet - Mailing list pgsql-jdbc

From Roman Chervotkin
Subject org.postgresql.util.PSQLException Column name candidates.id wasn't found in the ResultSet
Date
Msg-id c1b06e90511240558w6243aa14ma5ce5feafd49b188@mail.gmail.com
Whole thread Raw
Responses Re: org.postgresql.util.PSQLException Column name candidates.id  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Hi, there.
May be silly question but I can't understand it.

I have query in my application "SELECT * FROM candidates WHERE candidates.id=?"

so after query executed I've got exception
 Exception Details: org.postgresql.util.PSQLException
  Der Spaltenname candidates.id wurde in diesem ResultSet nicht gefunden,

But if remove tablename from query and just leave column name like this
"SELECT * FROM candidates WHERE id=?" query executed without a problem. But from phpmyadmin both these queries worked.
I tried this for two tables and get the same results.

I'm using Postgresql 8.1 with postgresql-8.1-404.jdbc3.jar

Thanks,
Roman.

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Can PostgreSQL do data type automated casting in
Next
From: Thomas Kellerer
Date:
Subject: Re: Why is bool == java.sql.Types.BIT ??