do language plpgsql $$
declare
l_message_text text;
l_excp_context text;
begin
.... код
exception
when others then
GET STACKED DIAGNOSTICS
l_message_text = MESSAGE_TEXT,
l_excp_context := PG_EXCEPTION_CONTEXT;
raise notice 'message text: >> % <<', l_message_text;
raise notice 'exception stack: >> % <<', l_excp_context;
end;
$$
declare
l_message_text text;
l_excp_context text;
begin
.... код
exception
when others then
GET STACKED DIAGNOSTICS
l_message_text = MESSAGE_TEXT,
l_excp_context := PG_EXCEPTION_CONTEXT;
raise notice 'message text: >> % <<', l_message_text;
raise notice 'exception stack: >> % <<', l_excp_context;
end;
$$
Комментариев нет:
Отправить комментарий