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

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Yang Zhang <yanghatespam(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Any way to *not* use server-side prepared statements in Postgresql?
Date: 2011-07-19 03:59:50
Message-ID: 4E250136.4070807@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Akio Iwaasa 2011-07-19 04:35:41 Re: org.postgresql.jdbc4.Jdbc4Array.free() is not yet implemented
Previous Message Yang Zhang 2011-07-19 03:47:26 Re: Any way to *not* use server-side prepared statements in Postgresql?