Re: Tighten up a few overly lax regexes in pg_dump's tap tests

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Date: 2019-02-04 12:12:48
Message-ID: B313C32C-0E24-4AFB-95FF-6DA0C4E18A89@yesql.se
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

> On 4 Feb 2019, at 11:54, David Rowley <david(dot)rowley(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-02-04 12:54:15 Re: ATTACH/DETACH PARTITION CONCURRENTLY
Previous Message Andrew Gierth 2019-02-04 12:07:21 Re: draft patch for strtof()