pgsql ODBC text escaping issue

Поиск
Список
Период
Сортировка
От Zhidong She
Тема pgsql ODBC text escaping issue
Дата
Msg-id CAAhmQAc2366SSfDmkihFJXzqSE5TvkSF2f-J-00d3V_JydttfA@mail.gmail.com
обсуждение исходный текст
Ответы Re: [ODBC] pgsql ODBC text escaping issue  (Raiford@labware.com)
Список 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 по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: spacewalk and postgres
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Building an home computer for best Poker Tracker performance