aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2020-01-27 11:03:21 -0500
committerRobert Haas <rhaas@postgresql.org>2020-01-27 11:04:51 -0500
commit1f3a021730be98b880d94cabbe21de7e4d8136f5 (patch)
treea1eacb3d158bef0a800bb751906bc2640e5eb908 /src/backend/access/gist/gistbuild.c
parent3e4818e9dd5be294d97ca67012528cb1c0b0ccaa (diff)
downloadpostgresql-1f3a021730be98b880d94cabbe21de7e4d8136f5.tar.gz
postgresql-1f3a021730be98b880d94cabbe21de7e4d8136f5.zip
Adjust pg_parse_json() so that it does not directly ereport().
Instead, it now returns a value indicating either success or the type of error which occurred. The old behavior is still available by calling pg_parse_json_or_ereport(). If the new interface is used, an error can be thrown by passing the return value of pg_parse_json() to json_ereport_error(). pg_parse_json() can still elog() in can't-happen cases, but it seems like that issue is best handled separately. Adjust json_lex() and json_count_array_elements() to return an error code, too. This is all in preparation for making the backend's json parser available to frontend code. Reviewed and/or tested by Mark Dilger and Andrew Dunstan. Discussion: http://postgr.es/m/CA+TgmoYfOXhd27MUDGioVh6QtpD0C1K-f6ObSA10AWiHBAL5bA@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions