Darafei "Komяpa" Praliaskouski wrote:

>  - how do currently existing coverage tools display coverage for such a
> large macro?
> 
> I expect DEFINE's to be treated as comments.

It is, but then it is counted in the callsite where each branch is
displayed separately.  So in
https://coverage.postgresql.org/src/pl/plpgsql/src/pl_exec.c.gcov.html
line 2028 you can see a bunch of "+" and three "-".

>  - can this macro become a function?

The "exit_action" argument makes it tough.  It can probably be done --
it seems to require contorting the one callsite that uses "goto" though.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to