From: | Raiford(at)labware(dot)com |
---|---|
To: | Zhidong She <zhidong(dot)she(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org, pgsql-odbc-owner(at)postgresql(dot)org |
Subject: | Re: [ODBC] pgsql ODBC text escaping issue |
Date: | 2011-07-20 12:07:51 |
Message-ID: | OFEA7D74EC.1E422074-ON852578D3.00422040-852578D3.0042A368@labware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-odbc |
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(dot)she(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, Zhidong
She <zhidong(dot)she(at)gmail(dot)com>
Date: 07/20/2011 03:58 AM
Subject: [ODBC] pgsql ODBC text escaping issue
Sent by: pgsql-odbc-owner(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-07-20 12:21:08 | Re: Worse performance on partitioned table than in non partitioned table |
Previous Message | Raymond O'Donnell | 2011-07-20 11:50:32 | Re: compile postgres with visual studio 2010 |
From | Date | Subject | |
---|---|---|---|
Next Message | McCaughey, Michael J | 2011-07-28 21:16:29 | FW: Unicode error on WinXP x64 |
Previous Message | Zhidong She | 2011-07-20 07:58:16 | pgsql ODBC text escaping issue |