Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

没有将反斜线当做普通文本 #793

Open
jd-zhang opened this issue Jul 5, 2022 · 2 comments
Open

没有将反斜线当做普通文本 #793

jd-zhang opened this issue Jul 5, 2022 · 2 comments

Comments

@jd-zhang
Copy link
Contributor

jd-zhang commented Jul 5, 2022

*Issue migrated from trac ticket # 877 www.kunlunbase.com *

component: computing nodes | priority: major

2022-07-05 16:53:08: vito@zettadb.com created the issue


sql code:
set escape_string_warning = off;
set standard_conforming_strings = on;

select 'a\bcd' as f1, 'a\b*cd' as f2, 'a\b**cd' as f3, 'abcd' as f4, 'ab*cd' as f5, '\' as f6;

ERROR:  syntax error at or near "\"
LINE 1: ...cd' as f2, 'a\b*''cd' as f3, 'abcd\'   as f4, 'ab\*cd' as ...

pg中的输出:

  f1   |   f2   |   f3    |  f4   |   f5   | f6
-------+--------+---------+-------+--------+----
 a\bcd | a\b'cd | a\b''cd | abcd\ | ab\'cd | \\
(1 row)

set standard_conforming_strings = off;

select 'a\\bcd' as f1, 'a\\b\'cd' as f2, 'a\\b\'''cd' as f3, 'abcd\\'   as f4, 'ab\\\'cd' as f5, '\\\\' as f6;
  f1   |   f2   |   f3    |  f4   |   f5   | f6
-------+--------+---------+-------+--------+----
 a\bcd | a\b'cd | a\b''cd | abcd\ | ab\'cd | \\
(1 row)
@jd-zhang
Copy link
Contributor Author

jd-zhang commented Jul 6, 2022

2022-07-06 18:18:31: zhaowei@zettadb.com changed owner from david to kunlun

@jd-zhang
Copy link
Contributor Author

jd-zhang commented Jul 6, 2022

2022-07-06 18:18:31: zhaowei@zettadb.com changed status from assigned to accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant