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

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects other objects instantiated from this class and it's parent class
Дата
Msg-id 980428861.3a70283d0ba2d@webmail.retep.org.uk
обсуждение исходный текст
Ответ на Re: [BUGS] JDBC PreparedStatement.setMaxRows() affects other objects instantiated from this class and it's parent class  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-jdbc
Quoting Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us]
> > Sent: Tuesday, January 16, 2001 12:00 PM
> > To: southern@heymax.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@candle.pha.pa.us]
> > > Sent: Friday, January 12, 2001 11:41 AM
> > > To: southern@heymax.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@candle.pha.pa.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@candle.pha.pa.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@candle.pha.pa.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@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Michael Stephenson
Дата:
Сообщение: RE: Re: Postgresql JDBC driver - Support for Scrollable Re sult Sets
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: [BUGS] Re: [INTERFACES] jdbc driver: Support for 'BOOL'