pgsql: Clean up some more freshly-dead code in pg_dump and pg_upgrade.

2021-12-16 Thread Tom Lane
Clean up some more freshly-dead code in pg_dump and pg_upgrade. I missed a few things in 30e7c175b and e469f0aaf, as noted by Justin Pryzby. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c49d926833f

pgsql: Remove psql support for server versions preceding 9.2.

2021-12-16 Thread Tom Lane
Remove psql support for server versions preceding 9.2. Per discussion, we'll limit support for old servers to those branches that can still be built easily on modern platforms, which as of now is 9.2 and up. Aside from removing code that is dead per the assumption of server >= 9.2, I tweaked the

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Ensure casting to typmod -1 generates a RelabelType.

2021-12-16 Thread Tom Lane
Ensure casting to typmod -1 generates a RelabelType. Fix the code changed by commit 5c056b0c2 so that we always generate RelabelType, not something else, for a cast to unspecified typmod. Otherwise planner optimizations might not happen. It appears we missed this point because the previous experi

pgsql: Simplify the general-purpose 64-bit integer parsing APIs

2021-12-16 Thread Peter Eisentraut
Simplify the general-purpose 64-bit integer parsing APIs pg_strtouint64() is a wrapper around strtoull/strtoul/_strtoui64, but it seems no longer necessary to have this indirection. msvc/Solution.pm claims HAVE_STRTOULL, so the "MSVC only" part seems unnecessary. Also, we have code in c.h to subs