Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E5C7DB5DC67 for ; Thu, 3 Nov 2011 13:35:38 -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 96899-04 for ; Thu, 3 Nov 2011 16:35:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 39431B5DBC2 for ; Thu, 3 Nov 2011 13:35:38 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id pA3GZaFR009936 for ; Thu, 3 Nov 2011 16:35:36 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id pA3GZaOK009935; Thu, 3 Nov 2011 16:35:36 GMT (envelope-from www) Date: Thu, 3 Nov 2011 16:35:36 GMT Message-Id: <201111031635.pA3GZaOK009935@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe From: "Gary Kenney" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201111/24 X-Sequence-Number: 31619 The following bug has been logged online: Bug reference: 6285 Logged by: Gary Kenney Email address: gary.kenney@xerox.com PostgreSQL version: 9.1.1 Operating system: Windows 7 Description: PreparedStatement#executeUpdate gets syntax error on apostrophe Details: The value that was assigned via PreparedStatement.setString, was "Gary's Document". Note the apostrophe. Without the apostrophe, there is no error. Stack trace: 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:152) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:100) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.j ava:517) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.j ava:50) 01 Nov 2011 16:29:09 - [Thread[Thread-63,5,main]] - at org.postgresql.jdbc1.AbstractJdbc1Statement.executeUpdate(AbstractJdbc1State ment.java:273) : my code :