Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Corey Huinker <corey.huinker@gmail.com>,
Daniel Verite <daniel@manitou-mail.org>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Greg Stark <stark@mit.edu>, Erik Rijkers <er@xs4all.nl>,
Robert Haas <robertmhaas@gmail.com>,
Jim Nasby <Jim.Nasby@bluetreble.com>,
PostgreSQL <pgsql-hackers@postgresql.org>,
pgsql-hackers-owner@postgresql.org
Date: 2017-03-29T18:16:15Z
Lists: pgsql-hackers
Hello Tom, > If someone were to put together a TAP test suite that covered all that > and made for a meaningful improvement in psql's altogether-miserable > code coverage report[1], I would think that that would be a useful > expenditure of buildfarm time. Ok, this is an interesting point. > What I'm objecting to is paying the overhead for such a suite in order > to test just this one thing. Well, it should start somewhere. Once something is running it is easier to add more tests. > think that that passes the bang-for-buck test; or in other words, this > isn't the place I would start if I were creating a TAP suite for psql. Sure, I would not have started with that either. Note that from this patch point of view, it is somehow logical to start testing a given feature when this very feature is being developed... The summary is that we agree that psql test coverage is abysmal, but you do not want to bootstrap a better test infrastructure for this particular and rather special new feature. Ok. Maybe Corey can submit another patch with the exit 3 test removed. -- Fabien.
Commits
-
Support \if ... \elif ... \else ... \endif in psql scripting.
- e984ef5861df 10.0 landed
-
Add a "void *" passthrough pointer for psqlscan.l's callback functions.
- 895e36bb3f36 10.0 landed