pgsql ODBC text escaping issue - Mailing list pgsql-general

From Zhidong She
Subject pgsql ODBC text escaping issue
Date
Msg-id CAAhmQAc2366SSfDmkihFJXzqSE5TvkSF2f-J-00d3V_JydttfA@mail.gmail.com
Whole thread Raw
Responses Re: [ODBC] pgsql ODBC text escaping issue  (Raiford@labware.com)
List pgsql-general
Hi all,

I have a problem on text escaping. In my application, I have a table
offlinemsg, which has one column id with long, and has another column
msg with text.
pgsql ODBC and dynamic SQL binding was used when I tried to insert
data into offlinemsg.
the sql is : insert into offlinemsg values(?, ?)
and the msg value is: <msg='test', from='ss' to='dd'/>

During test, I found that ODBC will automatically add escaping to the
value, so the msg value will be tranfer to: <msg=\\'test\\',
from=\\'ss\\' to=\\'dd\\'/>, then final sent to postgres server.
Becuase this escaping transition is not standard, the postgres server
will log a warning in the pg_log, which is:
2011-07-17 16:53:24 CST WARNING:  nonstandard use of \' in a string
literal at character 82
2011-07-17 16:53:24 CST HINT:  Use '' to write quotes in strings, or
use the escape string syntax (E'...').

Since we have massive this kind of offline message, after several
days, the disk is full of pg_log and postgres services down.

The ODBC version we used is 07.03.0100.

Is it a known issue? How to avoid the massive warning log?

Thanks very much!

Br,
Zhidong

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: spacewalk and postgres
Next
From: Greg Smith
Date:
Subject: Re: Building an home computer for best Poker Tracker performance