Re: unterminated quoted string - Mailing list pgsql-jdbc

From Holger Klawitter
Subject Re: unterminated quoted string
Date
Msg-id 200304150959.02490.lists@klawitter.de
Whole thread Raw
In response to Re: unterminated quoted string  ("Alexey Yudichev" <Alexey@francoudi.com>)
List pgsql-jdbc
> > > and if address is an empty string, sometimes (very rarely) i get
> > >
> > > java.sql.SQLException: ERROR:  Unterminated quoted string

I once in a while got a similar error when somehow a '\0' managed to sneek
inside a string. As a result, the whole Tomcat<->Postgresql communication
stopped (in most cases). The problem probably comes from the different
treatment of zeroes in Strings in Java and C/C++.

I solved the problem by filtering out such zeroes before passing them as
parameters into prepared statements.

Mit freundlichem Gruß / With kind regards
    Holger Klawitter
--
lists@klawitter.de


pgsql-jdbc by date:

Previous
From: "Alexey Yudichev"
Date:
Subject: Re: unterminated quoted string
Next
From: Nic Ferrier
Date:
Subject: the build