setUseServerPrepare(true) and executeQuery(String)

From: Harald Krake <harald(at)krake(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: setUseServerPrepare(true) and executeQuery(String)
Date: 2002-11-30 14:42:29
Message-ID: 200211301542.29994.harald@krake.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

playing with the new server side prepared statements of 7.3 I discovered
that _all_ statements will be prepared as server objects, not only
the prepared ones. Depending on the application this might result in
a permanently increasing number of server objects.

In executeQuery(String), AbstractJdbc1Statement.java:141
I would suggest the following modification:

boolean old_useServerPrepare = m_useServerPrepare;
m_useServerPrepare = false; // turn off for non-prepared statements
java.sql.ResultSet rs = executeQuery();
m_useServerPrepare = old_useServerPrepare;
return rs;

regards,
Harald.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Harald Krake 2002-11-30 16:02:28 bug in AbstractJdbc1Statement.java (7.3)
Previous Message pginfo 2002-11-30 07:47:23 JDBC and pg 7.3