PostgreSQL plpgsql 存储过程、函数 - 状态、异常变量打印、异常捕获... - GET [STACKED] DIAGNOSTICS

标签

PostgreSQL , GET , STACKED , DIAGNOSTICS

背景

使用GET STACKED DIAGNOSTICS捕获异常时的STACK内容。

使用GET DIAGNOSTICS捕获运行过程中的状态值。

GET DIAGNOSTICS捕获运行过程中的状态值

There are several ways to determine the effect of a command. The first method is to use the GET DIAGNOSTICS command, which has the form:

GET [ CURRENT ] DIAGNOSTICS variable { = | := } item [ , ... ];  
GET DIAGNOSTICS integer_var = 
点赞