Re: binary patch problems - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: binary patch problems
Date
Msg-id CAH_hXRatdSJQwwiUAn0+-Nta=XSQPV=sdFHGGE0t3ckhV1sXag@mail.gmail.com
Whole thread Raw
In response to Re: binary patch problems  (Radosław Smogura <rsmogura@softperience.eu>)
Responses Re: binary patch problems  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
> The PG "one shot" statements will not make this obsolete
> 1) Driver will be backward compatible (it's still supports 7.x editions)
> 2) Above problem will be still present.
> 3) Java perpared statements uses ? inseted of positional parameters, so driver
> need to parse query in any way.

I think what Tom is saying is that you'll be able to set
prepareThreshold to 1 in the driver (always use named server-side
prepared statements) and the server will automagically do the right
thing. Right now, the big problem is that only unnamed prepared
statements include the "feature" of being able to consider parameters
in the query plan (since unnamed statements are not reused, there's no
sense in planning them before you have parameters). Other aspects of
using prepared statements through the jdbc driver wouldn't change, but
we should be able to forget about prepareThreshold (if I understand
this correctly), which would be very nice.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

pgsql-jdbc by date:

Previous
From: Radosław Smogura
Date:
Subject: Re: binary patch problems
Next
From: Kris Jurka
Date:
Subject: Re: binary patch problems