pgsql: Simplify json lexing state

From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify json lexing state
Date: 2022-07-08 07:57:10
Message-ID: E1o9irM-001lS7-M8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-07-08 08:43:06 pgsql: Remove T_Join and T_Plan
Previous Message Peter Eisentraut 2022-07-08 07:32:12 pgsql: Reformat some more node comments