You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This adjusts the expression evaluation code for CoerceViaIO andCoerceToDomain to handle errors softly if needed.For CoerceViaIo, this means using InputFunctionCallSafe(), whichprovides the option to handle errors softly, instead of calling thetype input function directly.For CoerceToDomain, this simply entails replacing the ereport() inExecEvalConstraintCheck() by errsave().In both cases, the ErrorSaveContext to be used when evaluating theexpression is stored by ExecInitExprRec() in the expression's structin the expression's ExprEvalStep. The ErrorSaveContext is passed bysetting ExprState.escontext to point to it when callingExecInitExprRec() on the expression whose errors are to be handledsoftly.Note that no call site of ExecInitExprRec() has been changed in thiscommit, so there's no functional change. This is intended forimplementing new SQL/JSON expression nodes in future commits thatwill use to it suppress errors that may occur during type coercions.Reviewed-by: Álvaro HerreraDiscussion:https://postgr.es/m/CA+HiwqE4XTdfb1nW=Ojoy_tQSRhYt-q_kb6i5d4xcKyrLC1Nbg@mail.gmail.com