pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Darafei "Komяpa" Praliaskouski <me@komzpa.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Better testing coverage and unified coding for plpgsql loops
Date: Tue, 2 Jan 2018 10:46:23 -0300
Message-ID: <20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql> (raw)
In-Reply-To: <CAC8Q8t+nY_O+-KAvHao2T9Fj7rw1hVeSNNALERHyhvpTMgafgg@mail.gmail.com>

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




view thread (12+ messages)  latest in thread

Message-ID: <20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql>
Permalink:  ../20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, me@komzpa.net, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Better testing coverage and unified coding for plpgsql loops
  In-Reply-To: <20180102134623.4mhrbnc2im6bfp7a@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox