pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joseph Shraibman <jks@p1.selectacast.net>
To: Peter Mount <petermount@it.maidstone.gov.uk>
Cc: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: jdbc 7.0 fix for off by one errors.
Date: Mon, 15 May 2000 13:38:16 -0400
Message-ID: <39203607.3F069C3B@selectacast.net> (raw)
References: <1B3D5E532D18D311861A00600865478C70C5BD@exchange1.nt.maidstone.gov.uk>

Peter Mount wrote:

> Now I've seen this, I remember putting it in. If someone else hasn't
> done it yet I'll do it now.
>

Momjian put it in on friday after I submitted it to the patches list.  I
would have submitted it there first, but there are so many lists I can't
keep track of them all :s  Anyway, it's in.


>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough Council.
>
> -----Original Message-----
> From: Joseph Shraibman [mailto:jks@p1.selectacast.net]
> Sent: Thursday, May 11, 2000 8:18 PM
> To: pgsql-interfaces@postgreSQL.org; pgsql-hackers@postgresql.org
> Subject: [INTERFACES] jdbc 7.0 fix for off by one errors.
>
> Peter, not only didn't you fix the off by one errors in ResultSet from
> 6.5.3, you added more!
>
> I'm including a diff of
> postgresql-7.0/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java.
> I've clearly marked all the fixes I did. Would *someone* who has access
> to the cvs please put this in?
>
> ======================
>
> 8d7
> <
> 799,801c798,802
> <     {
> <  current_row = rows.size() + 1;
> <     }
> ---
> >     {//fixed by Joseph Shraibman <jks@selectacast.net>
> >  //current_row = rows.size() + 1;
> >  if (rows.size() > 0)
> >      current_row = rows.size();
> >    }
> 804,805c805,808
> <     {
> <  current_row = 0;
> ---
> >     {//fixed by Joseph Shraibman <jks@selectacast.net>
> >  //current_row = 0;
> >  if (rows.size() > 0)
> >      current_row = -1;
> 949c952
> <  return current_row;
> ---
> >  return current_row + 1;//fixed by Joseph Shraibman
> <jks@selectacast.net>
> 967c970,972
> <
> ---
> >     /**
> >      * @author Joseph Shraibman <jks@selectacast.net>
> >      */
> 970,972c975,980
> <  throw org.postgresql.Driver.notImplemented();
> <     }
> <
> ---
> >  //throw org.postgresql.Driver.notImplemented();
> >  return (current_row >= rows.size()  && rows.size() > 0);
> >    }
> >     /**
> >      * @author Joseph Shraibman <jks@selectacast.net>
> >      */
> 974,975c982,984
> <     {
> <  throw org.postgresql.Driver.notImplemented();
> ---
> >     {
> >  return (current_row < 0 && rows.size() > 0);
> >  //throw org.postgresql.Driver.notImplemented();
> 977c986,988
> <
> ---
> >     /**
> >      * @author Joseph Shraibman <jks@selectacast.net>
> >      */
> 980c991,992
> <  throw org.postgresql.Driver.notImplemented();
> ---
> >  return (current_row == 0 && rows.size() >= 0);
> >  //throw org.postgresql.Driver.notImplemented();
> 985c997,998
> <  throw org.postgresql.Driver.notImplemented();
> ---
> >  return (current_row == rows.size() -1  && rows.size() > 0);
> >  //throw org.postgresql.Driver.notImplemented();




view thread (2+ messages)  latest in thread

Message-ID: <39203607.3F069C3B@selectacast.net>
Permalink:  ../39203607.3F069C3B@selectacast.net/
Also on:    postgresql.org/message-id/39203607.3F069C3B@selectacast.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jks@p1.selectacast.net, petermount@it.maidstone.gov.uk, pgsql-hackers@postgresql.org
  Subject: Re: jdbc 7.0 fix for off by one errors.
  In-Reply-To: <39203607.3F069C3B@selectacast.net>

* 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