On 19/07/11 10:07, Yang Zhang wrote:
> Is there any way to circumvent server prepared statements? If it makes
> a difference, I'm asking regarding PG 8.4 and 9.0. Thanks in advance.
http://jdbc.postgresql.org/documentation/84/server-prepare.html
Set the prepare threshold using a call to the PGStatement interface of
the Statement you're interested in to control it on a statement by
statement level. This requires access to the real, unwrapped Statement
instance, which isn't available through some connection pooling systems.
You can set the prepare threshold using the prepareThreshold connection
argumnent to set it for all statements.
Whether 0 or -1 disables prepared statements don't seem to be
documented. Check the PgJDBC sources, or give it a try and see.
--
Craig Ringer