pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Kenney <gary.kenney@xerox.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #6285: PreparedStatement#executeUpdate gets syntax error on apostrophe
Date: Thu, 3 Nov 2011 16:35:36 GMT
Message-ID: <201111031635.pA3GZaOK009935@wwwmaster.postgresql.org> (raw)


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
:



view thread (4+ messages)  latest in thread

Message-ID: <201111031635.pA3GZaOK009935@wwwmaster.postgresql.org>
Permalink:  ../201111031635.pA3GZaOK009935@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201111031635.pA3GZaOK009935@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: gary.kenney@xerox.com, 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>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox