+1, let's shorten those queries. The coast is probably pretty clear now if you want to go do that.
On it.
The earlier conversion of pg_set_attribute_stats (which once had many not-null params) to pg_restore_* tests (where only the columns that identify the stat row are actually required) meant that a lot of parameters which were previously required were now inconsequential to the test. However, it is important to demonstrate cases where the rest of the restore operation completed after given bad statistic was encountered, but that can be adequately done by one "bystander" parameter rather than the whole fleet.
Other notes: * organized the tests into roughly three groups: relation tests, attribute tests, and set-difference tests. * tests that raise an error bubble up to the top of their respective groups * tests that would have multiple warnings are reduced to having just one wherever possible * each test gets a comment about what is to be demonstrated * attention paid to parameter values to avoid coincidental values that could mislead someone into thinking the value was written somewhere when that just happened to be what was already there, etc. * the set difference tests remain, as they proved extremely useful in detecting undesirable side-effects during development