get_exception_details(p_proc_schema text, p_proc_name text, p_exception_name text, p_errcode text, p_param_data jsonb, p_context_data jsonb)


Description

Returns exception details based on the passed parameters represented as a pretty-printed JSON object. The returned value is intended to standardize the details related to RAISEd exceptions and be suitable for use in setting the RAISE DETAILS variable.

Parameters

  • p_proc_schema :: Required? True; Default: ( No Default )

    The schema name hosting the function or store procedure which raised the exception.

  • p_proc_name :: Required? True; Default: ( No Default )

    The name of the process which raised the exception.

  • p_exception_name :: Required? True; Default: ( No Default )

    A standard name for the exception raised.

  • p_errcode :: Required? True; Default: ( No Default )

    Error code complying with the PostgreSQL standard error codes (https://www.postgresql.org/docs/current/errcodes-appendix.html). Typically this will be a compatible error code made outside of already designated error codes.

  • p_param_data :: Required? False; Default: ( No Default )

    A jsonb object where the keys are relevant parameters.

  • p_context_data :: Required? False; Default: ( No Default )

    A jsonb object encapsulating relevant data which might help in interpreting the exception, if such data exists.

Parameters

Name Type Mode
p_proc_schema text IN
p_proc_name text IN
p_exception_name text IN
p_errcode text IN
p_param_data jsonb IN
p_context_data jsonb IN

Definition