Re: Re-read of updated row using scrollable ResultSet returns old data

From: Andrew Hastie <andrew(at)ahastie(dot)net>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Re-read of updated row using scrollable ResultSet returns old data
Date: 2011-04-01 15:20:22
Message-ID: 4D95ED36.9070704@ahastie.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

My mistake :-(

Appears my test program had both of its tests the wrong way around, so
after fixing and re-testing I can confirm that the behavior IS
consistent with what the meta-data states for both "own" updates and
"other" updates.

It also means my tests against MS SQLServer and IBM DB2 for the
"commercial" driver I'm using reveal that they don't support "own
updates visible", so congrats to the PG project for getting this support
in the driver unlike the competition!

Apologies to all.
Andrew

On 03/31/2011 11:20 PM, Oliver Jowett wrote:
> On 1 April 2011 03:20, Andrew Hastie<andrew(at)ahastie(dot)net> wrote:
>> It appears that the PG driver returns the original rather than the updated
>> data values for an updatable ResultSet. This is where the updates are
>> applied to a single table ResultSet in a single transaction.
> That's not meant to happen. Do you have a testcase showing the problem?
>
>> INFO - Own updates visible for TYPE_SCROLL_INSENSITIVE = true
>> INFO - Other updates visible for TYPE_SCROLL_INSENSITIVE = false
>> INFO - Own updates visible for TYPE_SCROLL_SENSITIVE = true
>> INFO - Other updates visible for TYPE_SCROLL_SENSITIVE = false
>> If however you applied the row update using an SQL UPDATE on a separate
>> Statement as opposed to using the ResultSet.updateX() methods within the
>> same transaction, then you DO see the new value at step 8. I suggest both
>> techniques should yield the same results.
> That's also not meant to happen - the driver should behave according
> to what the metadata claims (notably, "other updates" are not
> visible).
> I think we need to see your code here.
>
> Oliver

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Maciek Sakrejda 2011-04-01 16:36:01 Re: JDK1.7 support
Previous Message Kris Jurka 2011-04-01 14:57:13 GIT [was Re: JDK1.7 support]