Reduce maintenance burden of alternative output files with \if \quit

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Reduce maintenance burden of alternative output files with \if \quit
Дата
Msg-id 20181103215515.2pnx2gb5qs2mcwfl@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Reduce maintenance burden of alternative output files with \if\quit  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: bugfix: BUG #15477: Procedure call with named inout refcursor parameter - "invalid input syntax for type boolean"
Следующее
От: LAM JUN RONG
Дата:
Сообщение: Re: [PATCH] Improvements to "Getting started" tutorial for GoogleCode-in task