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

From Daniel Gustafsson
Subject Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Date
Msg-id B313C32C-0E24-4AFB-95FF-6DA0C4E18A89@yesql.se
Whole thread Raw
In response to 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  (Michael Paquier <michael@paquier.xyz>)
Re: Tighten up a few overly lax regexes in pg_dump's tap tests  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
> On 4 Feb 2019, at 11:54, David Rowley <david.rowley@2ndquadrant.com> wrote:
>
> There are a few regexes in pg_dump's tap tests that are neglecting to
> escape the dot in "schema.table" type expressions. This could result
> in the test passing when it shouldn't.  It seems worth putting that
> right.

+1 for tightening it up, and the patch looks good to me.

We may also want to use the + metacharacter instead of * in a few places, since
the intent is to always match something, where matching nothing should be
considered an error:

-          qr/^ALTER TEXT SEARCH DICTIONARY dump_test.alt_ts_dict1 OWNER TO .*;/m,
+          qr/^ALTER TEXT SEARCH DICTIONARY dump_test\.alt_ts_dict1 OWNER TO .*;/m,

cheers ./daniel

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: draft patch for strtof()
Next
From: Robert Haas
Date:
Subject: Re: ATTACH/DETACH PARTITION CONCURRENTLY