Move jsonapi.c and jsonapi.h to src/common.
authorRobert Haas <rhaas@postgresql.org>
Wed, 29 Jan 2020 15:19:24 +0000 (10:19 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 29 Jan 2020 15:22:51 +0000 (10:22 -0500)
commitbeb4699091e9fab1c5f465056bef35c9ddf7f9fc
tree49206e96c8840b42e6462cfed38302e03cd9130c
parentdc788668bb269b10a108e87d14fefd1b9301b793
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
12 files changed:
contrib/hstore/hstore_io.c
src/backend/tsearch/to_tsany.c
src/backend/tsearch/wparser.c
src/backend/utils/adt/Makefile
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb_util.c
src/backend/utils/adt/jsonfuncs.c
src/common/Makefile
src/common/jsonapi.c [moved from src/backend/utils/adt/jsonapi.c with 96% similarity]
src/include/common/jsonapi.h [moved from src/include/utils/jsonapi.h with 99% similarity]
src/include/utils/jsonfuncs.h