1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Fix incorrect logic in JSON number lexer

Detectable by gcc -Wlogical-op.

Add two regression test cases that would previously allow incorrect
values to pass.
This commit is contained in:
Peter Eisentraut
2012-05-20 02:24:46 +03:00
parent fe2534e534
commit f1f6737e15
3 changed files with 14 additions and 2 deletions

View File

@ -22,6 +22,8 @@ SELECT '9223372036854775808'::json; -- OK, even though it's too large for int8
SELECT '1e100'::json; -- OK
SELECT '1.3e100'::json; -- OK
SELECT '1f2'::json; -- ERROR
SELECT '0.x1'::json; -- ERROR
SELECT '1.3ex100'::json; -- ERROR
-- Arrays.
SELECT '[]'::json; -- OK