Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 525101337BCC for ; Wed, 6 Oct 2010 18:16:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 77043-01 for ; Wed, 6 Oct 2010 21:16:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 421E01337BCB for ; Wed, 6 Oct 2010 18:16:20 -0300 (ADT) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P3bLP-0005A4-QU; Thu, 07 Oct 2010 10:16:12 +1300 Message-ID: <4CACE716.5010600@opencloud.com> Date: Thu, 07 Oct 2010 10:16:06 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: louis CC: pgsql-jdbc@postgresql.org Subject: Re: The logic behind the prepared statement in PostgreSQL References: <1286365302.13691.35.camel@london> <4CAC696F.9020109@opencloud.com> <1286371782.17773.51.camel@london> In-Reply-To: <1286371782.17773.51.camel@london> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/57 X-Sequence-Number: 21025 louis wrote: > However, while tracing the call stack I found that the > core.v3.QueryExecutorImpl.sendBind method sends a query statement Name > to PGStream, does it mean JDBC driver use the statement name to identify > the corresponding execution plan on a Postgresql server? > I have such assumption since PGStream seems to be the connection between > JDBC driver and the PostgreSQL server, and I can't find other obvious > path for JDBC code to specify an execution plan on the server side. A Bind message associates parameter values with a previously created statement. You probably want to read the docs that describe the FE/BE protocol: http://www.postgresql.org/docs/9.0/static/protocol.html Oliver