Pushed with some adjustment of the comments. I also simplified the
datestyle setting to just "ISO", because that's sufficient: that
DateStyle doesn't care about DateOrder. Since the settings are
supposed to match what pg_dump uses, it's just confusing if they don't.
Also, I didn't commit the test case. It was useful for development,
but it seemed entirely too expensive to keep forevermore compared to its
likely future value. It increased the runtime of 100_bugs.pl by about
a third, and I'm afraid the likely future value is nil. The most likely
bug in this area would be introducing some new GUC that we need to set
and forgetting to do so here; but this test case could not expose that.
regards, tom lane