resultset.getXXX methods return current row even if on insert row

From: "John T(dot) Dow" <john(at)johntdow(dot)com>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: resultset.getXXX methods return current row even if on insert row
Date: 2012-01-10 05:48:05
Message-ID: 20120110055143.70F0C1E16586@mail.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

According to the documentationfor JDBC, you can use the getter methods on the insert row. But the postgres implementation of JDBC always returns values from the current row.

John

PS: JDBC does not seem to have a way of asking the driver whether it's on the insert row.

I suppose you could call relative(0). If it's on the insert row it will throw an exception. If not on the insert row, then relative(0) should not throw an exception but it shouldn't do anything else either. Is there a better way?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stefan Keller 2012-01-10 06:26:14 Re: [JDBC] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues
Previous Message Dave Cramer 2012-01-10 00:41:22 Re: problem: query result in jdbc is <> result in psql