Re: Tighten up a few overly lax regexes in pg_dump's tap tests - Mailing list pgsql-hackers

From David Rowley
Subject Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Date
Msg-id CAKJS1f-6F0fB3EtJ3gUpPumajgfy6F6uYdM9ku1OUvaivR_MoQ@mail.gmail.com
Whole thread Raw
In response to Re: Tighten up a few overly lax regexes in pg_dump's tap tests  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Fri, 8 Feb 2019 at 13:04, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Feb 07, 2019 at 03:33:54PM +0100, Daniel Gustafsson wrote:
> > Correct.  The idea was to maintain readability while making the regex a bit
> > better, without any claims to make it perfect.
>
> Agreed with your position.  I see no point is making all the
> expressions unreadable for little gain.  What Daniel proposed upthread
> had a better balance in my opinion than the previous behavior, without
> sacrifying the readability of anything and still improving the error
> detection.

FWIW, this was the first time I'd really worked with TAP tests.  I had
been looking into it because I needed to add a new test.

I was surprised to see it working this way and not just doing a diff
with some known good output.  I'm maybe just missing the reason that's
not possible, but to me, it seems a bit less error-prone than trying
to ensure an exact match with a bunch of regular expressions.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Next
From: Michael Paquier
Date:
Subject: Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server