Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Erik Rijkers <er(at)xs4all(dot)nl>, Robert Haas <robertmhaas(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: 2017-03-12 07:35:37
Message-ID: alpine.DEB.2.20.1703120825100.5791@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Starting to poke at this... the proposal to add prove checks for psql
> just to see whether \if respects ON_ERROR_STOP seems like an incredibly
> expensive way to test a rather minor point. On my machine, "make check"
> in bin/psql goes from zero time to close to 8 seconds. I'm not really
> on board with adding that kind of time to every buildfarm run for the
> foreseeable future just for this.

ISTM that these tests allowed to find bugs in the implementation, so they
were useful at some point. They are still useful in the short term if the
implementation is to be changed significantly to respond to your various
requirements. The underlying issue with TAP test is that it installs a new
cluster on each script, which is quite costly.

In this case, the same result could be achieved with a number of small
failing tests, which only launch "psql". Could that be acceptable? What
you suggest is to keep only *one* failing test, which I find is kind of a
regression from a testing coverage perspective, although obviously it is
possible.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-03-12 08:22:08 Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Previous Message Michael Paquier 2017-03-12 07:07:19 Re: scram and \password