Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 70F0C1E16586 for ; Tue, 10 Jan 2012 01:51:42 -0400 (AST) Received: from mmail01.realprodata.com ([198.144.36.137]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RkUcX-00086k-3m for pgsql-jdbc@postgresql.org; Tue, 10 Jan 2012 05:51:42 +0000 Received: (qmail 2691 invoked from network); 10 Jan 2012 05:51:24 -0000 Received: from unknown (HELO W7) (john@johntdow.com@151.201.139.26) by mmail01.realprodata.com with SMTP (1e05c9dc-3b4f-11e1-87d1-00188b328d3c); Tue, 10 Jan 2012 00:51:24 -0500 From: "John T. Dow" To: "pgsql-jdbc@postgresql.org" Date: Tue, 10 Jan 2012 00:48:05 -0500 X-Mailer: PMMail 2000 Professional (2.20.2717) For Windows 2000 (5.1.2600;3) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: resultset.getXXX methods return current row even if on insert row X-MagicMail-UUID: 1e05c9dc-3b4f-11e1-87d1-00188b328d3c X-Pg-Spam-Score: 0.5 (/) Message-Id: <20120110055143.70F0C1E16586@mail.postgresql.org> X-Archive-Number: 201201/40 X-Sequence-Number: 22580 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?