diff options
| author | Tom Lane | 2012-06-05 00:43:57 +0000 |
|---|---|---|
| committer | Tom Lane | 2012-06-05 00:43:57 +0000 |
| commit | 3dd8e596812e3adb72aecafb23fbb6a30836c475 (patch) | |
| tree | 61d2e9e1b565d0f70704288e0aa60dfaa99c70d0 /src/test | |
| parent | d9b31e4859df5325b7d3d2cc94b0e907f1cf1d3e (diff) | |
Fix bogus handling of control characters in json_lex_string().
The original coding misbehaved if "char" is signed, and also made the
extremely poor decision to print control characters literally when trying
to complain about them. Report and patch by Shigeru Hanada.
In passing, also fix core dump risk in report_parse_error() should the
parse state be something other than what it expects.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/json.out | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out index ed8b2370762..4b1ad89de6e 100644 --- a/src/test/regress/expected/json.out +++ b/src/test/regress/expected/json.out @@ -26,8 +26,7 @@ def"'::json; -- ERROR, unescaped newline in string constant ERROR: invalid input syntax for type json LINE 1: SELECT '"abc ^ -DETAIL: line 1: Character " -" must be escaped. +DETAIL: line 1: Character with value "0x0a" must be escaped. SELECT '"\n\"\\"'::json; -- OK, legal escapes json ---------- |
