postgresql/src/include/utils
Robert Haas 1f3a021730 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
2020-01-27 11:04:51 -05:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
aclchk_internal.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
array.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
arrayaccess.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ascii.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
attoptcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
builtins.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
bytea.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
combocid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
date.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
datetime.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
datum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dsa.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dynahash.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
elog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
evtcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
expandeddatum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
expandedrecord.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
float.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
fmgrtab.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
formatting.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
freepage.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
geo_decls.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
guc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
guc_tables.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hashutils.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
help_config.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hsearch.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
index_selfuncs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
inet.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
int8.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
inval.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
json.h Adjust src/include/utils/jsonapi.h so it's not backend-only. 2020-01-24 09:58:37 -08:00
jsonapi.h Adjust pg_parse_json() so that it does not directly ereport(). 2020-01-27 11:04:51 -05:00
jsonb.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jsonfuncs.h Adjust src/include/utils/jsonapi.h so it's not backend-only. 2020-01-24 09:58:37 -08:00
jsonpath.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
logtape.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
lsyscache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
memdebug.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
memutils.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
numeric.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
palloc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
partcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_crc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_locale.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_lsn.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_rusage.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pidfile.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
plancache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
portal.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ps_status.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
queryenvironment.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rangetypes.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
regproc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rel.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relfilenodemap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relmapper.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relptr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reltrigger.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
resowner.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
resowner_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rls.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ruleutils.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sampling.h Report progress of ANALYZE commands 2020-01-15 11:14:39 -03:00
selfuncs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sharedtuplestore.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snapmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snapshot.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sortsupport.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spccache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
syscache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
timeout.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
timestamp.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tuplesort.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tuplestore.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
typcache.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tzparser.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
uuid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
varbit.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
varlena.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xml.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00