From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Reduce maintenance burden of alternative output files with \if \quit |
Date: | 2018-11-03 21:55:15 |
Message-ID: | 20181103215515.2pnx2gb5qs2mcwfl@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
We have a few alterntive expected output files that are essentially full
of errors, because a certain feature isn't supported. Those are somewhat
painful to maintain. I wonder if it'd be a good idea to reduce the
maintenance overhead for some of them by putting something like
SELECT NOT feature_check_expr() AS dont_have_feature
\gset
\if :dont_have_feature
\quit
\endif
at the start of such regression tests. Then the alternative
'dont-have-the-feature' output file will stay the same when adding new
tests.
It's a bit annoying that when running such a sequence interactively one
can hit
if (pset.cur_cmd_interactive && !active_branch &&
!is_branching_command(cmd))
{
psql_error("\\%s command ignored; use \\endif or Ctrl-C to exit current \\if block\n",
cmd);
}
but given that's just when running interactively, it shouldn't be too
bad.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | LAM JUN RONG | 2018-11-03 22:17:39 | Re: [PATCH] Improvements to "Getting started" tutorial for Google Code-in task |
Previous Message | Tom Lane | 2018-11-03 21:47:04 | Re: bugfix: BUG #15477: Procedure call with named inout refcursor parameter - "invalid input syntax for type boolean" |