DBE_UTILITY
APIs
Table 1 provides all APIs supported by the DBE_UTILITY package.
API |
Description |
---|---|
Outputs the call stack of an abnormal stored procedure. |
|
Outputs detailed information about a stored procedure exception. |
|
Outputs the call stack of a stored procedure. |
|
Outputs the current time, which is used to obtain the execution duration. |
- DBE_UTILITY.FORMAT_ERROR_BACKTRACE
Returns the call stack where an error occurs during execution. The prototype of the DBE_UTILITY.FORMAT_ERROR_BACKTRACE function is as follows:
1 2 |
DBE_UTILITY.FORMAT_ERROR_BACKTRACE() RETURN TEXT; |
- DBE_UTILITY.FORMAT_ERROR_STACK
Returns the detailed information about the error location when an error occurs during the execution. The prototype of the DBE_UTILITY.FORMAT_ERROR_STACK function is as follows:
1 2 |
DBE_UTILITY.FORMAT_ERROR_STACK() RETURN TEXT; |
- DBE_UTILITY.FORMAT_CALL_STACK
Sets the call stack of the output function. The prototype of the DBE_UTILITY.FORMAT_CALL_STACK function is as follows:
1 2 |
DBE_UTILITY.FORMAT_CALL_STACK() RETURN TEXT; |
Sets the output time, which is usually used for difference. A separate return value is meaningless. The prototype of the DBE_UTILITY.GET_TIME function is as follows:
1 2 |
DBE_UTILITY.GET_TIME() RETURN BIGINT; |
Examples
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