E.2. MON$CALL_STACK
MON$CALL_STACK displays calls to the stack from queries executing in stored procedures and triggers.
| Column Name | Data Type | Description |
|---|---|---|
|
| Call identifier |
|
| The identifier of the top-level SQL statement, the one that initiated the chain of calls.
Use this identifier to find the records about the active statement in the |
|
| The identifier of the calling trigger or stored procedure |
|
| PSQL object (module) name |
|
| PSQL object type (trigger or stored procedure):
|
|
| The date and time when the call was started |
|
| The number of the source line in the SQL statement being executed at the moment of the snapshot |
|
| The number of the source column in the SQL statement being executed at the moment of the snapshot |
|
| Statistics identifier |
EXECUTE STATEMENT CallsInformation about calls during the execution of the EXECUTE STATEMENT statement does not get into the call stack.
Example using MON$CALL_STACKGetting the call stack for all connections except own:
WITH RECURSIVEHEAD AS (SELECTCALL.MON$STATEMENT_ID, CALL.MON$CALL_ID,CALL.MON$OBJECT_NAME, CALL.MON$OBJECT_TYPEFROM MON$CALL_STACK CALLWHERE CALL.MON$CALLER_ID IS NULLUNION ALLSELECTCALL.MON$STATEMENT_ID, CALL.MON$CALL_ID,CALL.MON$OBJECT_NAME, CALL.MON$OBJECT_TYPEFROM MON$CALL_STACK CALLJOIN HEAD ON CALL.MON$CALLER_ID = HEAD.MON$CALL_ID)SELECT MON$ATTACHMENT_ID, MON$OBJECT_NAME, MON$OBJECT_TYPEFROM HEADJOIN MON$STATEMENTS STMT ON STMT.MON$STATEMENT_ID = HEAD.MON$STATEMENT_IDWHERE STMT.MON$ATTACHMENT_ID <> CURRENT_CONNECTION