aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/sql/json.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/sql/json.sql')
-rw-r--r--src/test/regress/sql/json.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/regress/sql/json.sql b/src/test/regress/sql/json.sql
index e366c6f51b6..589e0cea367 100644
--- a/src/test/regress/sql/json.sql
+++ b/src/test/regress/sql/json.sql
@@ -7,6 +7,11 @@ SELECT '"abc
def"'::json; -- ERROR, unescaped newline in string constant
SELECT '"\n\"\\"'::json; -- OK, legal escapes
SELECT '"\v"'::json; -- ERROR, not a valid JSON escape
+
+-- Check fast path for longer strings (at least 16 bytes long)
+SELECT ('"'||repeat('.', 12)||'abc"')::json; -- OK
+SELECT ('"'||repeat('.', 12)||'abc\n"')::json; -- OK, legal escapes
+
-- see json_encoding test for input with unicode escapes
-- Numbers.