pgsql: Improve some ancient, crufty code in bootstrap + initdb.

2020-09-05 Thread Tom Lane
Improve some ancient, crufty code in bootstrap + initdb. At some point back in the last century, somebody felt that reading all of pg_type twice was cheaper, or at least easier, than using repalloc() to resize the Typ[] array dynamically. That seems like an entirely wacko proposition, so rewrite

pgsql: Yet more elimination of dead stores and useless initializations.

2020-09-05 Thread Tom Lane
Yet more elimination of dead stores and useless initializations. I'm not sure what tool Ranier was using, but the ones I contributed were found by using a newer version of scan-build than I tried before. Ranier Vilela and Tom Lane Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJy

pgsql: Switch to multi-inserts when registering dependencies for many c

2020-09-05 Thread Michael Paquier
Switch to multi-inserts when registering dependencies for many code paths This commit improves the dependency registrations by taking advantage of the preliminary work done in 63110c62, to group together the insertion of dependencies of the same type to pg_depend. With the current layer of routin

pgsql: Fix typo in comment

2020-09-05 Thread Peter Eisentraut
Fix typo in comment Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/556cbdfce4ffe01410b89dbf01b27315aa201bbf Modified Files -- src/backend/libpq/auth-scram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

pgsql: Extend SQL function tests lightly

2020-09-05 Thread Peter Eisentraut
Extend SQL function tests lightly The basic tests that defined SQL functions didn't actually run the functions to see if they worked. Add that, and also fix a minor mistake in a function that was revealed by this. (This is not a question of test coverage, since there are other places where SQL f