Re: Re: JDBC Performance

From: Gunnar R|nning <gunnar(at)candleweb(dot)no>
To: "Keith L(dot) Musser" <kmusser(at)idisys(dot)com>
Cc: "Gunnar R|nning" <gunnar(at)candleweb(dot)no>, "PGSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: JDBC Performance
Date: 2000-09-29 17:06:27
Message-ID: x6hf6zdt64.fsf@thor.candleweb.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

"Keith L. Musser" <kmusser(at)idisys(dot)com> writes:

> Gunnar,
>
> Your new JDBC driver (postgresql.jar, 29-Sept-2000, 14:47, 187K) caused
> the following error.
>

>
> SELECT host, port FROM Servers WHERE PID=1;
> Bad Integer int4
> at org.postgresql.jdbc2.ResultSet.getInt(ResultSet.java:261)
> at org.postgresql.jdbc2.ResultSet.getObject(ResultSet.java:748)
> at org.postgresql.jdbc2.ResultSet.getObject(ResultSet.java:789)

OK, I found the problem. I will post a fixed version later today. The
problem was that getObject() executed Field.getSQLType() which in turn
executed Connection.ExecSQL(). I modified ExecSQL to deallocate the cached
byte arrays on entry, because I believed it only were called by
Statement.execute() methods. I guess I should move the deallocation into
the Statement classes instead, as that is were it really belongs.

I interpret the JDBC spec. to say that only one ResultSet will be open
per. Statement, but one Connection canm have several statements with one
result set each.

Regards,

Gunnar

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Kientzle 2000-09-29 17:10:21 Re: postgresql
Previous Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2000-09-29 17:04:24 Re: Redhat 7 and PgSQL

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gunnar R|nning 2000-09-29 17:35:39 Re: Re: JDBC Performance
Previous Message Gunnar R|nning 2000-09-29 16:08:54 Re: Re: JDBC Performance