Clean up some pg_dump tests

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-10-02T07:12:29Z
Lists: pgsql-hackers

Attachments

Following [0], I did a broader analysis of some dubious or nonsensical 
like/unlike combinations in the pg_dump tests.

This includes

1) Remove useless entries from "unlike" lists.  Runs that are not
    listed in "like" don't need to be excluded in "unlike".

2) Ensure there is always a "like" list, even if it is empty.  This
    makes the test more self-documenting.

3) Use predefined lists such as %full_runs where appropriate, instead
    of listing all runs separately.

I also added code that checks 1 and 2 automatically and issues a message
for violations.  (This is currently done with "diag".  We could also 
make it an error.)

The results are in the attached patch.

[0]: 
https://www.postgresql.org/message-id/3ddf79f2-8b7b-a093-11d2-5c739bc64f86@eisentraut.org

Commits

  1. Apply pg_dump test cleanups to test_pg_dump as well

  2. Clean up some pg_dump tests