Thanks for that, but, frankly, it seems like most were in agreement that we should go ahead and get rid of the trailing whitespace from psql's output. The last couple emails on that thread hardly seems like a critical issue (and I'm not sure why we couldn't eliminate that whitespace and then programmatically forbid trailing whitespace anyway..).
Thanks for the pointer, that's quite interesting.
The real problem here, IMO, is the break in expected regression outputs. The previous thread mainly discussed that in terms of its impact on third-party tests using pg_regress, but for our own purposes it would be just as nasty to need to adjust every single test case we back-patch for the next five years.
That's funny. Linked thread is from 2010. Here we are in 2016 arguing about it (we would've done by now). :)
Looks like cost of having them around is not exactly 0.
Either way, I've attached another version of my patch - this time it avoids touching example psql output. Baby steps.
I'll let you decide on the way forward. I'm just happy to send some patches.
Overall, regression tests that compare output of psql seems like a solution not without drawbacks. I absolutely see the appeal, but this practically freezes behavior of psql and makes e.g. server tests depend not only server behavior but also on piece of irrelevant client-only code.
I could imagine a test system that is both has more-or-less human-readable expected.out files and does not depend on exact decorations added by psql.
-- Vladimir Rusinov Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland Registered in Dublin, Ireland Registration Number: 368047