Re: postgres 9.2 error whit apostrophes - Mailing list pgsql-admin

From David Johnston
Subject Re: postgres 9.2 error whit apostrophes
Date
Msg-id 1370992126675-5758862.post@n5.nabble.com
Whole thread Raw
In response to Re: postgres 9.2 error whit apostrophes  (Alejandro Brust <alejandrob@pasteleros.org.ar>)
List pgsql-admin
Alejandro Brust wrote
>>
>> Two ways to insert that.
>>
>> 1: escape it:
>> update tu02t00 set tu02pfusua = 'D''AGOSTINO' ...
>>
>> 2: Use $$ quotes:
>>
>> update tu02t00 set tu02pfusua = $$D'AGOSTINO$$ ...
>>
> YES, from psql that work great
> I will explain more,
> we were using a jdbc7 from genexus(developers IDE), with PG9.0 and it
> works
> now we upgrade to pg9.2 without migrate the jdbc7 from genexus because
> it seem donsnt work on genexus(developers problem, i know), but
> this is the actual scenario
> so, is any clue?
> Server encoding?
> client encoding?

You should provide the actual string query you are supplying to JDBC as well
as the server's log message containing the entirety of the failing query.

In short, if the JDBC is sending a malformed query to PostgreSQL there is
not likely anything you can do to make PostgreSQL accept it.

The main change along these lines between 9.0 and 9.2 is the setting of the
GUC "standard_conforming_strings" to on by default (this happened in 9.1).
You might try changing this to "off" and see what happens.

see:
http://www.postgresql.org/docs/9.1/interactive/release-9-1.html
Section E.10.2.1
for details.

Again, it is impossible to really provide help without knowing exactly what
is being sent to, and more importantly received by, the PostgreSQL server.
The error message you provided is insufficient.

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/postgres-9-2-error-whit-apostrophes-tp5758840p5758862.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


pgsql-admin by date:

Previous
From: Alejandro Brust
Date:
Subject: Re: postgres 9.2 error whit apostrophes
Next
From: Albe Laurenz
Date:
Subject: Re: postgres 9.2 error whit apostrophes