From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Flipper <flipper@gammadue.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: prepared statement: are they pre-compiled?
Date: Thu, 05 Jul 2007 13:24:32 +0100
Message-ID: <468CE300.3030405@enterprisedb.com> (raw)
In-Reply-To: <200707051413.40572.flipper@gammadue.com>
References: <200707051023.25650.flipper@gammadue.com>
<200707051208.59443.flipper@gammadue.com>
<468CC580.6080207@enterprisedb.com>
<200707051413.40572.flipper@gammadue.com>
(please keep the list cc'd so that others can answer and benefit from
the discussions as well)
Flipper wrote:
> thank you for the quick reply. May I ask something more in order to understand
> if I'm right? When you use a Statement you should use a simple query
> protocol (i.e., without a bind) but from the driver code I see that the
> sequence of messages is always the same, that is parse, bind, execute....
> I thought the simple query protocol does not include the parse+bind steps,
> since they should be in the extended query protocol.....am I wrong?
I think we use the extended query protocol for all queries, including
those issued from a Statement. That means we still send a Bind message,
there just isn't any parameter values in it. Note that we don't wait for
a response after each message, so that doesn't cause extra round trips
to the server.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki@enterprisedb.com, flipper@gammadue.com
Subject: Re: prepared statement: are they pre-compiled?
In-Reply-To: <468CE300.3030405@enterprisedb.com>
References: <200707051023.25650.flipper@gammadue.com> <200707051208.59443.flipper@gammadue.com> <468CC580.6080207@enterprisedb.com> <200707051413.40572.flipper@gammadue.com> <468CE300.3030405@enterprisedb.com>
* 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