Re: Any way to *not* use server-side prepared statements in Postgresql? - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: Any way to *not* use server-side prepared statements in Postgresql?
Date
Msg-id 4E250136.4070807@postnewspapers.com.au
Whole thread Raw
In response to Any way to *not* use server-side prepared statements in Postgresql?  (Yang Zhang <yanghatespam@gmail.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Yang Zhang
Date:
Subject: Re: Any way to *not* use server-side prepared statements in Postgresql?
Next
From: Akio Iwaasa
Date:
Subject: Re: org.postgresql.jdbc4.Jdbc4Array.free() is not yet implemented