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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, 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-05 00:15:06
Message-ID: 20190205001506.GA1882@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 04, 2019 at 01:12:48PM +0100, Daniel Gustafsson wrote:
> +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,

Some tests are missing the update, and it seems to me that
tightening things up is a good thing, still we ought to do it
consistently. Some places missing the update:
- ALTER OPERATOR FAMILY
- ALTER OPERATOR CLASS
- ALTER SEQUENCE
- ALTER TABLE (ONLY, partitioned table)
- BLOB load
- COMMENT ON
- COPY
- INSERT INTO
- CREATE COLLATION

test_pg_dump's 001_base.pl needs also a refresh.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-02-05 00:50:50 Re: Tighten up a few overly lax regexes in pg_dump's tap tests
Previous Message Alvaro Herrera 2019-02-04 23:53:59 Re: propagating replica identity to partitions