Re: Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects other objects instantiated from this class and it's parent class

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: southern(at)heymax(dot)com, PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects other objects instantiated from this class and it's parent class
Date: 2001-01-25 13:21:01
Message-ID: 980428861.3a70283d0ba2d@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Quoting Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>:

I'll check the SUN JDBC book I'm now working with.

Any method within Statement should only affect that object. If it's affecting
every Statement, then it sounds to me like a bug.

Peter

>
> Any comments on this from the JDBC croud?
>
> > Bruce,
> >
> > I went and grabbed the newest JAR from Peter's site. Calling
> setMaxRows()
> > on one Statement object still affects all other objects. I checked
> out the
> > most recent source from CVS and discovered that the PostgreSQL driver
> > Statement.setMaxRows() modifies a public instance variable in
> Connection.
> >
> > I quickly looked at the JDBC API and Sun's "For Driver Writers"
> document at
> > http://java.sun.com/products/jdbc/driverdevs.html. Neither says
> anything
> > about how setMaxRows() should be implemented. I am also relatively
> new to
> > Java, so my following suggestion may be off the mark.
> >
> > I would suggest that the PostgreSQL JDBC driver allow developers to
> call
> > setMaxRows() on a particular Statement object without it affecting
> other
> > ResultSet objects obtained by calling execute methods on other
> objects.
> > This would require making maxrows an instance variable of Statement.
> > Additionally, an argument of maxRows would have to be added to the
> > Connection.ExecSQL() argument list. This would enable Statement,
> > PreparedStatement and CallableStatement objects to pass max rows value
> to
> > the Connection object when executing queries.
> >
> > Jason Southern
> >
> >
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > Sent: Tuesday, January 16, 2001 12:00 PM
> > To: southern(at)heymax(dot)com
> > Subject: Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects other
> > objects intantiated from this class and it's parent class
> >
> >
> > I think you will find it is fixed in the 7.1 JAR file at:
> >
> > http://www.retep.org.uk
> >
> > > Bruce,
> > >
> > > Sorry for the late reply. I'd be happy to help. I'm a newbie at
> open
> > > source development efforts, so could you point me to any docs on
> the
> > > postgresql.org web site that will fill me in on to interact with
> your open
> > > source community? Meanwhile, I'll get the newest source from the
> CVS web
> > > interface on postgresql.org.
> > >
> > > Jason
> > >
> > > -----Original Message-----
> > > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > > Sent: Friday, January 12, 2001 11:41 AM
> > > To: southern(at)heymax(dot)com
> > > Subject: Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects
> other
> > > objects intantiated from this class and it's parent class
> > >
> > >
> > > > Bruce,
> > > >
> > > > Thanks for your quick response. I ran the tests using the 7.1
> beta
> > driver
> > > > on Peter Mount's website.
> > > > (http://www.retep.org.uk/postgres/jars/jdbc7.1-1.2.jar). The
> results of
> > > the
> > > > test using the class I attached in the bug report were the
> identical to
> > > the
> > > > 7.0-1.2 driver.
> > >
> > > OK, that is bad. Can I ask you to download the 7.1 source and tell
> me
> > > where your changes go into that source? Thanks.
> > >
> > > --
> > > Bruce Momjian | http://candle.pha.pa.us
> > > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > > + If your life is a hard drive, | 830 Blythe Avenue
> > > + Christ can be your backup. | Drexel Hill, Pennsylvania
> 19026
> > >
> > >
> > >
> >
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill, Pennsylvania
> 19026
> >
> >
> >
>
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania
> 19026
>

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Peter T Mount 2001-01-25 13:26:50 Re: Re: [INTERFACES] jdbc driver: Support for 'BOOL'
Previous Message Tom Lane 2001-01-25 11:20:11 Re: Open 7.1 items