Re: [JDBC] Patch for jdbc2 ResultSet.java - Mailing list pgsql-patches

From Dave Harkness
Subject Re: [JDBC] Patch for jdbc2 ResultSet.java
Date
Msg-id 5.1.0.14.2.20010905195252.045d8158@mail.meconomy.com
Whole thread Raw
In response to Re: Patch for jdbc2 ResultSet.java  (Joseph Shraibman <jks@selectacast.net>)
List pgsql-patches
At 12:41 PM 9/5/2001, Joseph Shraibman wrote:
>new patch:

There still seems to be an error with the same if-block.

!       if (index>=-rows.size())
!       internalIndex=rows.size()+index;

becomes

!       if (index > -rows_size)
!       internalIndex = rows_size+index;

Note that the original used >=, not >.

Also, why is the first edit being done? Granted it's faster in that it
doesn't null out the array of rows, but won't that have other effects? I'm
not very familiar with the code, so pardon if I'm off base on that.

         //release resources held (memory for tuples)
         if(rows!=null) {
-           rows.setSize(0);
             rows=null;
         }

Peace,
Dave


pgsql-patches by date:

Previous
From: Karel Zak
Date:
Subject: Re: [HACKERS] to_char and Roman Numeral (RN) bug
Next
From: Barry Lind
Date:
Subject: Patch to add bytea support to JDBC