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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-jdbc by date

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