From: Craig Ringer <craig@postnewspapers.com.au>
To: Yang Zhang <yanghatespam@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Any way to *not* use server-side prepared statements in Postgresql?
Date: Tue, 19 Jul 2011 11:59:50 +0800
Message-ID: <4E250136.4070807@postnewspapers.com.au> (raw)
In-Reply-To: <CAKxBDU9zBWCSe0ds0Vx75dpc_Rogxv2CfBCiQSrFWtrs3BTaAA@mail.gmail.com>
References: <CAKxBDU9zBWCSe0ds0Vx75dpc_Rogxv2CfBCiQSrFWtrs3BTaAA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: craig@postnewspapers.com.au, yanghatespam@gmail.com
Subject: Re: Any way to *not* use server-side prepared statements in Postgresql?
In-Reply-To: <4E250136.4070807@postnewspapers.com.au>
References: <CAKxBDU9zBWCSe0ds0Vx75dpc_Rogxv2CfBCiQSrFWtrs3BTaAA@mail.gmail.com> <4E250136.4070807@postnewspapers.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox