Updated on 2025-05-29 GMT+08:00

pl_trace_func_start

Function for enabling the trace function. For details about the column, see Table 1.

Table 1 pl_trace_func_start

Parameter

Type

Description

session_id

bigint

ID of the session for which the trace function needs to be enabled.

max_num

integer

Maximum number of messages that can be traced. The value ranges from 100 to 10000.

level

text

Trace level.

  • session: session level. The trace function is always enabled before the pl_trace_func_end function is called or the session is closed.
  • portal: portal level. The trace function is automatically disabled after a stored procedure is executed.
  • time: session level. The statement execution time is displayed at the session level.
  • threshold: session level. At the time level, only statements whose values are greater than or equal to the threshold are recorded.

threshold

float8

Threshold of the current trace, in milliseconds. This parameter is valid only when level is threshold.