Re: Better testing coverage and unified coding for plpgsql loops

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Better testing coverage and unified coding for plpgsql loops
Дата
Msg-id 20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Better testing coverage and unified coding for plpgsql loops  (Darafei "Komяpa" Praliaskouski <me@komzpa.net>)
Ответы Re: Better testing coverage and unified coding for plpgsql loops
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Tels"
Дата:
Сообщение: Re: Faster inserts with mostly-monotonically increasing values
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_(total_)relation_size and partitioned tables