Re: parametrized statements, but always replan? - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: parametrized statements, but always replan?
Date
Msg-id 14091.1166679742@sss.pgh.pa.us
Whole thread Raw
In response to Re: parametrized statements, but always replan?  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Dave Cramer <pg@fastcrypt.com> writes:
> The only time prepared statements won't replan is if you re-use the
> prepared statement, which your code does not.
> However... AFAIK, postgresql does not plan based on the parameter.

This was changed in 8.2: for an unnamed statement the planning step is
delayed until Bind time, so that the actual parameter values can be
considered.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kevin Murphy
Date:
Subject: State of the art in large scale inserts
Next
From: Didier BRETIN
Date:
Subject: ant specif task for pg_dump and pg_restore