From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Kevin Murphy <murphy@genome.chop.edu>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: parametrized statements, but always replan?
Date: Thu, 21 Dec 2006 00:42:22 -0500
Message-ID: <14091.1166679742@sss.pgh.pa.us> (raw)
In-Reply-To: <81F542C8-256C-4C29-AC7D-9223BBB3B2E0@fastcrypt.com>
References: <45899296.9040008@genome.chop.edu>
<81F542C8-256C-4C29-AC7D-9223BBB3B2E0@fastcrypt.com>
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
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: tgl@sss.pgh.pa.us, pg@fastcrypt.com, murphy@genome.chop.edu
Subject: Re: parametrized statements, but always replan?
In-Reply-To: <14091.1166679742@sss.pgh.pa.us>
References: <45899296.9040008@genome.chop.edu> <81F542C8-256C-4C29-AC7D-9223BBB3B2E0@fastcrypt.com> <14091.1166679742@sss.pgh.pa.us>
* 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