enhancing plpgsql debug api - hooks on statements errors and function errors - Mailing list pgsql-hackers

From Pavel Stehule
Subject enhancing plpgsql debug api - hooks on statements errors and function errors
Date
Msg-id CAFj8pRDGQo4thzrFJC5RCQcbpX6MWbMFhjnqe2rP14ctwuvDRA@mail.gmail.com
Whole thread Raw
Responses Re: enhancing plpgsql debug api - hooks on statements errors and function errors  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi

When I implemented profiler and coverage check to plpgsql_check I had to write a lot of hard maintaining code related to corect finishing some operations (counter incrementing) usually executed by stmt_end and func_end hooks. It is based on the fmgr hook and its own statement call stack. Can be nice if I can throw this code and use some nice buildin API.

Can we enhance dbg API with two hooks stmt_end_err func_end_err ?

These hooks can be called from exception handlers before re raising.

Or we can define new hooks like executor hooks - stmt_exec and func_exec. In custom hooks the exception can be catched.

What do you think about this proposal?

regards

Pavel




pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: In-placre persistance change of a relation
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Allow pg_archivecleanup to remove backup history files