pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.

pgsql: Fix pg_restore's misdesigned code for detecting archive file for

2021-04-01 Thread Tom Lane
Fix pg_restore's misdesigned code for detecting archive file format. Despite the clear comments pointing out that the duplicative code segments in ReadHead() and _discoverArchiveFormat() needed to be in sync, they were not: the latter did not bother to apply any of the sanity checks in the former.