Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 84A42B5DC2B for ; Thu, 3 Nov 2011 16:19:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 85838-07 for ; Thu, 3 Nov 2011 19:19:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 80A3FB5DBDF for ; Thu, 3 Nov 2011 16:19:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pA3JJHFE007361; Thu, 3 Nov 2011 15:19:17 -0400 (EDT) To: "Gary Kenney" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe In-reply-to: <201111031635.pA3GZaOK009935@wwwmaster.postgresql.org> References: <201111031635.pA3GZaOK009935@wwwmaster.postgresql.org> Comments: In-reply-to "Gary Kenney" message dated "Thu, 03 Nov 2011 16:35:36 +0000" Date: Thu, 03 Nov 2011 15:19:16 -0400 Message-ID: <7360.1320347956@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.101 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201111/25 X-Sequence-Number: 31620 "Gary Kenney" writes: > Description: PreparedStatement#executeUpdate gets syntax error on > apostrophe > The value that was assigned via PreparedStatement.setString, was "Gary's > Document". Note the apostrophe. Without the apostrophe, there is no error. Right offhand I would guess that you are using an old JDBC driver that isn't prepared for standard_conforming_strings to be turned on. If that isn't it, I'd suggest asking for help on the pgsql-jdbc mailing list; I'm not sure how many of those guys read pgsql-bugs. regards, tom lane