Move jsonapi.c and jsonapi.h to src/common.
Robert Haas <rhaas@postgresql.org>
Move jsonapi.c and jsonapi.h to src/common. To make this work, (1) makeJsonLexContextCstringLen now takes the encoding to be used as an argument; (2) check_stack_depth() is made to do nothing in frontend code, and (3) elog(ERROR, ...) is changed to pg_log_fatal + exit in frontend code. Mark Dilger, reviewed and slightly revised by me. Discussion: http://postgr.es/m/CA+TgmoYfOXhd27MUDGioVh6QtpD0C1K-f6ObSA10AWiHBAL5bA@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/hstore/hstore_io.c | modified | +1 −1 |
| src/backend/tsearch/to_tsany.c | modified | +1 −1 |
| src/backend/tsearch/wparser.c | modified | +1 −1 |
| src/backend/utils/adt/jsonb.c | modified | +1 −1 |
| src/backend/utils/adt/jsonb_util.c | modified | +1 −1 |
| src/backend/utils/adt/json.c | modified | +1 −1 |
| src/backend/utils/adt/jsonfuncs.c | modified | +4 −3 |
| src/backend/utils/adt/Makefile | modified | +0 −1 |
| src/common/jsonapi.c (from src/backend/utils/adt/jsonapi.c) | renamed | +27 −9 |
| src/common/Makefile | modified | +1 −0 |
| src/include/common/jsonapi.h (from src/include/utils/jsonapi.h) | renamed | +2 −0 |
| src/include/utils/jsonfuncs.h | modified | +1 −1 |
Discussion
- making the backend's json parser work in frontend code 101 messages · 2020-01-15 → 2020-01-30