From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove jsonapi.c's lex_accept(). |
Date: | 2020-01-24 18:35:28 |
Message-ID: | E1iv3nk-0002IT-2H@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Remove jsonapi.c's lex_accept().
At first glance, this function seems useful, but it actually increases
the amount of code required rather than decreasing it. Inline the
logic into the callers instead; most callers don't use the 'lexeme'
argument for anything and as a result considerable simplification is
possible.
Along the way, fix the header comment for the nearby function
lex_expect(), which mislabeled it as lex_accept().
Patch by me, reviewed by David Steele, Mark Dilger, and Andrew
Dunstan.
Discussion: http://postgr.es/m/CA+TgmoYfOXhd27MUDGioVh6QtpD0C1K-f6ObSA10AWiHBAL5bA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/530609aa4263bee5b5ca205d83f0dbad098d0465
Modified Files
--------------
src/backend/utils/adt/jsonapi.c | 124 +++++++++++++++++-----------------------
1 file changed, 51 insertions(+), 73 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2020-01-25 14:05:15 | pgsql: Add functions gcd() and lcm() for integer and numeric types. |
Previous Message | Robert Haas | 2020-01-24 18:22:55 | pgsql: Split JSON lexer/parser from 'json' data type support. |