DBE_UTILITY
Interface Description
Table 1 provides all interfaces supported by the DBE_UTILITY package.
Interface |
Description |
---|---|
Outputs a call stack of an abnormal stored procedure. |
|
Outputs detailed information about the stored procedure exception. |
|
Output a call stack of a stored procedure. |
|
Outputs the current time, which is used to obtain the execution duration. |
The stored procedure FORMAT_ERROR_BACKTRACE returns the call stack where an error occurs during execution. The DBE_UTILITY.FORMAT_ERROR_BACKTRACE function prototype is as follows:
1 2 |
DBE_UTILITY.FORMAT_ERROR_BACKTRACE() RETURN TEXT; |
The stored procedure FORMAT_ERROR_STACK returns the detailed information about the error location when an error occurs during the execution. The DBE_UTILITY.FORMAT_ERROR_STACK function prototype is as follows:
1 2 |
DBE_UTILITY.FORMAT_ERROR_STACK() RETURN TEXT; |
The stored procedure FORMAT_CALL_STACK sets the call stack of the output function. The DBE_UTILITY.FORMAT_CALL_STACK function prototype is as follows:
1 2 |
DBE_UTILITY.FORMAT_CALL_STACK() RETURN TEXT; |
The stored procedure GET_TIME sets the output time, which is usually used for difference. A separate return value is meaningless. The DBE_UTILITY.GET_TIME function prototype is as follows:
1 2 |
DBE_UTILITY.GET_TIME() RETURN BIGINT; |
Example
1 2 3 4 5 6 7 8 9 10 11 12 |
CREATE OR REPLACE PROCEDURE test_get_time1() AS declare start_time bigint; end_time bigint; BEGIN start_time:= dbe_utility.get_time (); pg_sleep(1); end_time:=dbe_utility.get_time (); dbe_output.print_line(end_time - start_time); END; / |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot