Skip site navigation (1) Skip section navigation (2)

Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?

From: Kris Jurka <books(at)ejurka(dot)com>
To: GEISINGER Marc - Contractor <Marc(dot)GEISINGER(at)external(dot)thalesgroup(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Bug in AbstracJdbc2Statement.replaceProcessing when using dollar quoting?
Date: 2012-09-25 03:17:27
Message-ID: alpine.BSO.2.00.1209242302470.1873@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Thu, 20 Sep 2012, GEISINGER Marc - Contractor wrote:

> 
> I think there is a bug in AbstracJdbc2Statement.replaceProcessing.  When I
> am trying to execute the following sql command with a java.sql.Statement the
> data written to the database is not what it should be:
> 
> INSERT INTO dev.stringtest (id, val) VALUES (1, $a$ {a}{f} {b} {f}$a$)
> 
> The replaceProcessing method removes {f} and cuts the string.

Yes, this is a bug in the JDBC driver.  The fact that it is a silent 
data loss bug makes it more severe.

There is no reason it shouldn't work other than people not having time to 
make the driver smart enough to handle dollar quotes in this context.

Kris Jurka

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2012-09-25 03:31:20
Subject: Re: data type of projected item in a union not correct
Previous:From: the6campbellsDate: 2012-09-25 01:33:00
Subject: data set combination of integer and decimal/numeric returns wrong result type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group