Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2E0711337B96 for ; Wed, 27 Apr 2011 17:29:17 -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 04328-02-3 for ; Wed, 27 Apr 2011 20:28:58 +0000 (UTC) X-Greylist: delayed 00:06:01.473565 by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id 6BA8C1337C05 for ; Wed, 27 Apr 2011 17:23:43 -0300 (ADT) Received: by bwz15 with SMTP id 15so1712275bwz.19 for ; Wed, 27 Apr 2011 13:23:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.139.199 with SMTP id f7mr1744994bku.23.1303935460039; Wed, 27 Apr 2011 13:17:40 -0700 (PDT) Received: by 10.204.53.14 with HTTP; Wed, 27 Apr 2011 13:17:39 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Apr 2011 08:17:39 +1200 Message-ID: Subject: Re: JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801 From: Oliver Jowett To: Brady S Edwards Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 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: 201104/98 X-Sequence-Number: 21824 On 28 April 2011 07:35, Brady S Edwards wrote: > When trying to setString(1,?) where the ? is in a pl/pgsql block I get an > error. ? is not considered a parameter marker if it occurs inside a literal string. The pl/pgsql code in your case is one big literal string (delimited by $$) It's just the same case as "SELECT 'should this be a parameter?'", which is a query that takes no parameters despite happening to contain a ? character. Oliver