Re: binary patch problems - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: binary patch problems
Date
Msg-id 25673.1316479171@sss.pgh.pa.us
Whole thread Raw
In response to Re: binary patch problems  (Maciek Sakrejda <msakrejda@truviso.com>)
Responses Re: binary patch problems  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-jdbc
Maciek Sakrejda <msakrejda@truviso.com> writes:
> 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).

Right.  We've rejiggered the backend so that planning is delayed until
parameter values are available in all cases.  (If the code finds that
the plans it's getting with the parameters aren't materially better than
a generic plan would be, it'll eventually go back to using generic
plans.  But hopefully you will never need to club it over the head to
avoid doing that.)

Anyway, this isn't going to hit the street for another year, so there's
no reason to worry about it too much right now.  I'm just saying you
shouldn't invest a lot of work in related areas without being aware that
that change is coming.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: behavior at the end of a transaction
Next
From: Craig Ringer
Date:
Subject: Re: binary patch problems