bug in jdbc - Mailing list pgsql-jdbc

From luvar@plaintext.sk
Subject bug in jdbc
Date
Msg-id 381613887.6661315070190151.JavaMail.root@shiva
Whole thread Raw
Responses Re: bug in jdbc
Re: bug in jdbc
List pgsql-jdbc
Hi, I have executed some update query and I have requested to return generated id...

statement.executeUpdate(query, Statement.RETURN_GENERATED_KEYS);
ResultSet ids  = statement.getGeneratedKeys();
ids.next();
ids.getInt(1);

It will fail with this exception:

19:03:50,300         WARN ObjectBrowser:254 - Bad value for type int : /home/luvar/output.svg
org.postgresql.util.PSQLException: Bad value for type int : /home/luvar/output.svg
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2759)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2003)
.....


I am using maven. Used jdbc version:

    <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.0-801.jdbc4</version>
    </dependency>

I have table constructed in such way, that id (bigserial typed) column is NOT first column. It is second and first
columnof my table is "url" column to which I try insert "/home/luvar/output.svg" value. 

Can you have a look and confirm this bug to me, or there is no bug and something I am doing bad?

pgsql-jdbc by date:

Previous
From: "ml-tb"
Date:
Subject: Re: Problem with sql ant task
Next
From: dmp
Date:
Subject: Re: bug in jdbc