Re: Re: JDBC Performance - Mailing list pgsql-general

From Gunnar R|nning
Subject Re: Re: JDBC Performance
Date
Msg-id x6hf6zdt64.fsf@thor.candleweb.no
Whole thread Raw
In response to Re: Re: JDBC Performance  ("Keith L. Musser" <kmusser@idisys.com>)
Responses Re: Re: JDBC Performance
List pgsql-general
"Keith L. Musser" <kmusser@idisys.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

pgsql-general by date:

Previous
From: teg@redhat.com (Trond Eivind Glomsrød)
Date:
Subject: Re: Redhat 7 and PgSQL
Next
From: Tim Kientzle
Date:
Subject: Re: postgresql