pgsql: Refactor check_ functions to use filehandle for status

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Refactor check_ functions to use filehandle for status
Дата
Msg-id E1oTLux-000kRD-7n@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: plpython: Don't create pgxsdir subdirectory in installdir target
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: doc: Fix typo in user inheritance documentation