提交 fa112cbc 编写于 作者: A Adam Lee

Fix gpload string escape syntax

To match behavior changes of this:

	commit 291f737a
	Author: Andreas Scherbaum <ascherbaum@pivotal.io>
	Date:   Sat May 7 00:08:39 2016 +0200

	    Change the default value of standard_conforming_strings to on

	    This change should be publicized to driver maintainers at once and
	    release-noted as an incompatibility with previous releases.

	    (cherry picked from commit 0839f312)

	    Changes to doc/src/sgml/{config,syntax}.sgml ignored as they are not
	    present in gpdb.

Backslash '\' is no longer recognized as esacpe by default, gpload.py
use quote("\\") as escape string, which translates into two backslashes,
if standard_conforming_strings is on, scanner will recognize it as
double backslashes rather than a single one.

We change escape string to a single backslash to avoid this problem,
which fixes gpload related CCLE cases.
Signed-off-by: NPeifeng Qiu <pqiu@pivotal.io>
上级 fb9081fc
......@@ -2163,7 +2163,7 @@ class gpload:
formatOpts += "escape %s " % quote(self.getconfig('gpload:input:quote',
unicode, extraStuff='for csv formatted data'))
else:
formatOpts += "escape %s " % quote("\\")
formatOpts += "escape '\\'"
if formatType=='csv':
formatOpts += "quote %s " % quote(self.getconfig('gpload:input:quote',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册