Thread: pgsql: Simplify json lexing state

pgsql: Simplify json lexing state

From
John Naylor
Date:
Simplify json lexing state

Instead of updating the length as we go, use a const pointer to end of
the input, which we know already at the start.

This simplifies the coding and may improve performance slightly, but
the real motivation for doing this is to make further changes in this
area easier to reason about.

Discussion:
https://www.postgresql.org/message-id/CAFBsxsGhaR2KQ5eisaK%3D6Vm60t%3DaxhD8Ckj1qFoCH1pktZi%2B2w%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3de359f18f2bfbc96272bd265264aa5c2f247ca4

Modified Files
--------------
src/common/jsonapi.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)