Re: Reduce maintenance burden of alternative output files with \if\quit - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Reduce maintenance burden of alternative output files with \if\quit
Date
Msg-id 1bd388c1-e8bd-1be8-f18c-c45e2f4b43d4@2ndquadrant.com
Whole thread Raw
In response to Reduce maintenance burden of alternative output files with \if \quit  (Andres Freund <andres@anarazel.de>)
Responses Re: Reduce maintenance burden of alternative output files with \if\quit  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 03/11/2018 22:55, Andres Freund wrote:
> 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.

If we don't want to run the file at all under a certain condition, we
have ways to do that, and we don't need those above mechanism.  But some
of those tests are used for testing that the unsupported feature fails
sanely.  For example, in the xml case, some stuff still works if xml is
not compiled in, and we need to check that.  If it gets to complicated
to maintain, then we can also split files.  The collation tests are
split like that.

What specific cases do you have in mind?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: pread() and pwrite()
Next
From: Jean-Christophe Arnu
Date:
Subject: Re: wal_dump output on CREATE DATABASE