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

From Michael Paquier
Subject Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Date
Msg-id 20190205014119.GB1882@paquier.xyz
Whole thread Raw
In response to Re: Tighten up a few overly lax regexes in pg_dump's tap tests  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Tighten up a few overly lax regexes in pg_dump's tap tests  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On Tue, Feb 05, 2019 at 01:50:50PM +1300, David Rowley wrote:
> I think I've done all the ones that use \E.  Those \Q ones don't need
> any escaping. I assume that's the ones you've found.  I didn't do an
> exhaustive check though.

Oh, good point.  I didn't know that anything between \Q and \E are
interpreted as literal characters.  Instead of the approach you are
proposing, perhaps it would make sense to extend this way of doing
things then?  For example some tests with CREATE CONVERSION do so.  It
looks much more portable than having to escape every dot.

>> test_pg_dump's 001_base.pl needs also a refresh.
>
> Yeah, I thought about looking, but I thought it might be a bottomless pit.

I just double-checked this one, and the regex patterns there look
all correct.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Protect syscache from bloating with negative cache entries