setUseServerPrepare(true) and executeQuery(String) - Mailing list pgsql-jdbc

From Harald Krake
Subject setUseServerPrepare(true) and executeQuery(String)
Date
Msg-id 200211301542.29994.harald@krake.de
Whole thread Raw
List 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.


pgsql-jdbc by date:

Previous
From: pginfo
Date:
Subject: JDBC and pg 7.3
Next
From: Harald Krake
Date:
Subject: bug in AbstractJdbc1Statement.java (7.3)