Re: postgres 9.2 error whit apostrophes

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: postgres 9.2 error whit apostrophes
Date: 2013-06-11 23:08:46
Message-ID: 1370992126675-5758862.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2013-06-12 07:03:54 Re: postgres 9.2 error whit apostrophes
Previous Message Alejandro Brust 2013-06-11 22:28:06 Re: postgres 9.2 error whit apostrophes