pgsql: Refactor check_ functions to use filehandle for status - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Refactor check_ functions to use filehandle for status
Date
Msg-id E1oTLux-000kRD-7n@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Refactor check_ functions to use filehandle for status

When reporting failure in check_ functions there is (typically) a text-
file mentioned in the error report which contains further details. Some
check_ functions kept a separate flag variable to indicate failure, and
some just checked the state of the filehandle as it's guaranteed to be
open when the check failed. This refactors the functions to consistently
do the same check on error reporting. As the error report contains the
filepath, it makes more sense to check the filehandle state and skip the
flag variable.

Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Bruce Momjian <bruce@momjian.us>
Discussion: https://postgr.es/m/595759F6-625B-4ED7-8125-91AF00437F83@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cad4323cd345ec91fbe8d118436d3d50fa53c300

Modified Files
--------------
src/bin/pg_upgrade/check.c    | 30 +++++-------------------------
src/bin/pg_upgrade/function.c |  4 +---
src/bin/pg_upgrade/version.c  |  7 +------
3 files changed, 7 insertions(+), 34 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: plpython: Don't create pgxsdir subdirectory in installdir target
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: doc: Fix typo in user inheritance documentation