Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 99C099FB4DC for ; Thu, 5 Jul 2007 09:25:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84792-03 for ; Thu, 5 Jul 2007 09:25:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by postgresql.org (Postfix) with ESMTP id 978A39FB212 for ; Thu, 5 Jul 2007 09:25:25 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so523954ugf for ; Thu, 05 Jul 2007 05:25:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=WAEp+IedCegLg+CiyWXpuDifKbK244BTqnAzI7acV83feEmBYbNqgkUHaHohUG8XvAbGM3K5u+QjEEGzk6iI8O99t/eBRd4lfDtWtRNKmPI/TwRlo2HZUgWwEggG4+w973qfrDRQShH9v82+xj9nsOM8WADZ7T53S4BRp8dDQN0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=qgN0V/UAgioWZNvXhAMfRfsmINHndvsgVefBwlZLhrp0nlQoI4j6R5FqjS9Bx02kTFjXyKNzyC5838EY8WJ8v2DeheFm2TwmO46sWk/UcD66FpY+wswPqDOq6Qd8Xmlfn4GqAf+KRPTMMZIO+zbewRmif7vq8Jqkm6CzB+8gR74= Received: by 10.67.15.15 with SMTP id s15mr1929992ugi.1183638323841; Thu, 05 Jul 2007 05:25:23 -0700 (PDT) Received: from ?172.24.32.77? ( [62.232.55.118]) by mx.google.com with ESMTPS id l33sm920933ugc.2007.07.05.05.25.21 (version=SSLv3 cipher=RC4-MD5); Thu, 05 Jul 2007 05:25:21 -0700 (PDT) Message-ID: <468CE300.3030405@enterprisedb.com> Date: Thu, 05 Jul 2007 13:24:32 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Flipper CC: List Subject: Re: prepared statement: are they pre-compiled? References: <200707051023.25650.flipper@gammadue.com> <200707051208.59443.flipper@gammadue.com> <468CC580.6080207@enterprisedb.com> <200707051413.40572.flipper@gammadue.com> In-Reply-To: <200707051413.40572.flipper@gammadue.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/20 X-Sequence-Number: 17194 (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