summaryrefslogtreecommitdiff
path: root/src/include/fmgr.h
diff options
context:
space:
mode:
authorTom Lane2022-12-11 16:28:15 +0000
committerTom Lane2022-12-11 16:28:15 +0000
commitc60c9badba9b4db3155eef081ae0b923f983168c (patch)
tree60b12d49fa9f01feff7707cef18fac7ebf24ab18 /src/include/fmgr.h
parent50428a301d5ad46316cac2192f2ca8d91898aa3c (diff)
Convert json_in and jsonb_in to report errors softly.
This requires a bit of further infrastructure-extension to allow trapping errors reported by numeric_in and pg_unicode_to_server, but otherwise it's pretty straightforward. In the case of jsonb_in, we are only capturing errors reported during the initial "parse" phase. The value-construction phase (JsonbValueToJsonb) can also throw errors if assorted implementation limits are exceeded. We should improve that, but it seems like a separable project. Andrew Dunstan and Tom Lane Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/fmgr.h')
-rw-r--r--src/include/fmgr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index b7832d0aa2a..972afe3aff9 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -704,6 +704,10 @@ extern bool InputFunctionCallSafe(FmgrInfo *flinfo, char *str,
Oid typioparam, int32 typmod,
fmNodePtr escontext,
Datum *result);
+extern bool DirectInputFunctionCallSafe(PGFunction func, char *str,
+ Oid typioparam, int32 typmod,
+ fmNodePtr escontext,
+ Datum *result);
extern Datum OidInputFunctionCall(Oid functionId, char *str,
Oid typioparam, int32 typmod);
extern char *OutputFunctionCall(FmgrInfo *flinfo, Datum val);