pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John T. Dow <john@johntdow.com>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: resultset.getXXX methods return current row even if on insert row
Date: Tue, 10 Jan 2012 00:48:05 -0500
Message-ID: <20120110055143.70F0C1E16586@mail.postgresql.org> (raw)

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?




Message-ID: <20120110055143.70F0C1E16586@mail.postgresql.org>
Permalink:  ../20120110055143.70F0C1E16586@mail.postgresql.org/
Also on:    postgresql.org/message-id/20120110055143.70F0C1E16586@mail.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: john@johntdow.com
  Subject: Re: resultset.getXXX methods return current row even if on insert row
  In-Reply-To: <20120110055143.70F0C1E16586@mail.postgresql.org>
  References: <20120110055143.70F0C1E16586@mail.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox