Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot, bind-address mysql multiple, sanibleone xxxx, ftp://192.168.100.100/, www.xxxcon

Links

XODOX
Impressum

#1: pgsql ODBC text escaping issue

Posted on 2011-07-20 09:58:16 by Zhidong She

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

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Report this message

#2: Re: pgsql ODBC text escaping issue

Posted on 2011-07-20 14:07:51 by Raiford

This is a multipart message in MIME format.
--=_alternative 0042A367852578D3_=
Content-Type: text/plain; charset="US-ASCII"

Have you tried one of the newer ODBC drivers? Also, you may want to look
into enabling standard_conforming_strings or disabling the warning
messages with escape_string_warning.

Jon



From: Zhidong She <zhidong.she@gmail.com>
To: pgsql-odbc@postgresql.org, pgsql-general@postgresql.org, Zhidong
She <zhidong.she@gmail.com>
Date: 07/20/2011 03:58 AM
Subject: [ODBC] pgsql ODBC text escaping issue
Sent by: pgsql-odbc-owner@postgresql.org



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

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc


--=_alternative 0042A367852578D3_=
Content-Type: text/html; charset="US-ASCII"

<font size=2 face="sans-serif">Have you tried one of the newer ODBC drivers?
&nbsp;Also, you may want to look into enabling standard_conforming_strings
or disabling the warning messages with escape_string_warning</font><font size=3>.</font>
<br>
<br><font size=2 face="sans-serif">Jon</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Zhidong She &lt;zhidong.she@gmail.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">pgsql-odbc@postgresql.org,
pgsql-general@postgresql.org, Zhidong She &lt;zhidong.she@gmail.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">07/20/2011 03:58 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">[ODBC] pgsql
ODBC text escaping issue</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">pgsql-odbc-owner@postgresql.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi all,<br>
<br>
I have a problem on text escaping. In my application, I have a table<br>
offlinemsg, which has one column id with long, and has another column<br>
msg with text.<br>
pgsql ODBC and dynamic SQL binding was used when I tried to insert<br>
data into offlinemsg.<br>
the sql is : insert into offlinemsg values(?, ?)<br>
and the msg value is: &lt;msg='test', from='ss' to='dd'/&gt;<br>
<br>
During test, I found that ODBC will automatically add escaping to the<br>
value, so the msg value will be tranfer to: &lt;msg=\\'test\\',<br>
from=\\'ss\\' to=\\'dd\\'/&gt;, then final sent to postgres server.<br>
Becuase this escaping transition is not standard, the postgres server<br>
will log a warning in the pg_log, which is:<br>
2011-07-17 16:53:24 CST WARNING: &nbsp;nonstandard use of \' in a string<br>
literal at character 82<br>
2011-07-17 16:53:24 CST HINT: &nbsp;Use '' to write quotes in strings,
or<br>
use the escape string syntax (E'...').<br>
<br>
Since we have massive this kind of offline message, after several<br>
days, the disk is full of pg_log and postgres services down.<br>
<br>
The ODBC version we used is 07.03.0100.<br>
<br>
Is it a known issue? How to avoid the massive warning log?<br>
<br>
Thanks very much!<br>
<br>
Br,<br>
Zhidong<br>
<br>
-- <br>
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)<br>
To make changes to your subscription:<br>
</font></tt><a href="http://www.postgresql.org/mailpref/pgsql-odbc"><tt><font size=2>http://www.postgresql.org/mailpref/pgsql-odbc</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
--=_alternative 0042A367852578D3_=--

Report this message