Remove jsonapi.c's lex_accept().
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/jsonapi.c | modified | +51 −73 |
Discussion
- making the backend's json parser work in frontend code 101 messages · 2020-01-15 → 2020-01-30