Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id AA3A0B5DD27 for ; Sat, 3 Sep 2011 14:23:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 55136-01 for ; Sat, 3 Sep 2011 17:22:56 +0000 (UTC) X-Greylist: delayed 00:06:23.110538 by SQLgrey-1.7.6 Received: from shiva.plaintext.sk (mail.plaintext.sk [81.0.124.6]) by mail.postgresql.org (Postfix) with ESMTP id 2AFC1B5DD20 for ; Sat, 3 Sep 2011 14:22:56 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by shiva.plaintext.sk (Postfix) with ESMTP id 9F65926C8C for ; Sat, 3 Sep 2011 19:16:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at plaintext.sk Received: from shiva.plaintext.sk ([127.0.0.1]) by localhost (shiva.plaintext.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gu74fX29f+a7 for ; Sat, 3 Sep 2011 19:16:30 +0200 (CEST) Received: from shiva.plaintext.sk (shiva.plaintext.sk [81.0.124.6]) by shiva.plaintext.sk (Postfix) with ESMTP id 4187D26C87 for ; Sat, 3 Sep 2011 19:16:30 +0200 (CEST) Date: Sat, 3 Sep 2011 18:16:30 +0100 (GMT+01:00) From: luvar@plaintext.sk To: pgsql-jdbc@postgresql.org Message-ID: <381613887.6661315070190151.JavaMail.root@shiva> In-Reply-To: <41953811.6641315070051379.JavaMail.root@shiva> Subject: bug in jdbc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mailer: Zimbra 5.0.16_GA_2921.UBUNTU8_64 (ZimbraWebClient - FF3.0 (Linux)/5.0.16_GA_2921.UBUNTU8_64) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/3 X-Sequence-Number: 22121 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: postgresql postgresql 9.0-801.jdbc4 I have table constructed in such way, that id (bigserial typed) column is NOT first column. It is second and first column of 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?