pgsql: Restrict some cases in parsing numerics in jsonpath

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Restrict some cases in parsing numerics in jsonpath
Date: 2019-04-01 15:18:12
Message-ID: E1hAyhQ-0001He-Bn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Restrict some cases in parsing numerics in jsonpath

Jsonpath now accepts integers with leading zeroes and floats starting with
a dot. However, SQL standard requires to follow JSON specification, which
doesn't allow none of these cases. Our json[b] datatypes also restrict that.
So, restrict it in jsonpath altogether.

Author: Nikita Glukhov

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e643501e5281ad5e0fa626dab1d51c1d38f639a

Modified Files
--------------
src/backend/utils/adt/jsonpath_scan.l | 6 +-
src/test/regress/expected/jsonpath.out | 117 +++++++++++++++------------------
2 files changed, 55 insertions(+), 68 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2019-04-01 18:25:56 pgsql: Unified logging system for command-line programs
Previous Message Peter Eisentraut 2019-04-01 08:49:27 pgsql: Catch syntax error in generated column definition