Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1A5FE9FB2AA for ; Tue, 26 Sep 2006 07:53:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 73109-05 for ; Tue, 26 Sep 2006 10:53:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 565139FB27E for ; Tue, 26 Sep 2006 07:53:49 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GSAZL-0007hr-81 for pgsql-jdbc@postgresql.org; Tue, 26 Sep 2006 12:53:43 +0200 Received: from 83.145.96.118 ([83.145.96.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Sep 2006 12:53:43 +0200 Received: from Marc.Herbert by 83.145.96.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Sep 2006 12:53:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Marc Herbert Subject: Re: Bind message Date: Tue, 26 Sep 2006 12:53:34 +0200 Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 83.145.96.118 User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:HnPOnwSzzTkFLOZlxN2AmuqnXKc= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.633 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, RCVD_NUMERIC_HELO, SPF_HELO_PASS, SPF_PASS X-Spam-Level: * X-Archive-Number: 200609/116 X-Sequence-Number: 15834 Kris Jurka writes: >> That's peculiar. The whole point of prepared statements is to obtain >> the optimization of statement reuse. > > Sometimes it is, sometimes the purpose of using a PreparedStatement is > to avoid escaping data yourself for a plain Statement execution. By the way this confusion has been introduced by JDBC. In ODBC the functions SQLBindParameter() and SQLPrepare() were not related. Both ODBC and JDBC docs warn the user that some drivers may not fully implement PREPARE. Exercise: define "fully" in a portable way. Granted, you can still complain if PREPARE does nothing at all. I remember a number of past discussions on this topic. Among others this one: "Subject: Limit vs setMaxRows issue"