summaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/function.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-07-12 07:13:51 +0300
committerPeter Eisentraut <peter_e@gmx.net>2011-07-12 07:13:51 +0300
commit912bc4f038b3daaea4477c4b4e79fbd8c15e67a0 (patch)
tree3abbc8e1ae427b65afc1566f63b31d88c41826d2 /contrib/pg_upgrade/function.c
parentafc9635c600ace716294a12d78abd37f65abd0ea (diff)
Make pg_upgrade output more consistent with project style
Add errno-based output to error messages where appropriate, reformat blocks to about 72 characters per line, use spaces instead of tabs for indentation, and other style adjustments.
Diffstat (limited to 'contrib/pg_upgrade/function.c')
-rw-r--r--contrib/pg_upgrade/function.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/pg_upgrade/function.c b/contrib/pg_upgrade/function.c
index 322014cd235..53d562f3bd3 100644
--- a/contrib/pg_upgrade/function.c
+++ b/contrib/pg_upgrade/function.c
@@ -237,9 +237,9 @@ check_loadable_libraries(void)
{
found = true;
if (script == NULL && (script = fopen(output_path, "w")) == NULL)
- pg_log(PG_FATAL, "Could not create necessary file: %s\n",
- output_path);
- fprintf(script, "Failed to load library: %s\n%s\n",
+ pg_log(PG_FATAL, "Could not open file \"%s\": %s\n",
+ output_path, getErrorText(errno));
+ fprintf(script, "Could not load library \"%s\"\n%s\n",
lib,
PQerrorMessage(conn));
}
@@ -255,12 +255,11 @@ check_loadable_libraries(void)
fclose(script);
pg_log(PG_REPORT, "fatal\n");
pg_log(PG_FATAL,
- "| Your installation references loadable libraries that are missing\n"
- "| from the new installation. You can add these libraries to\n"
- "| the new installation, or remove the functions using them\n"
- "| from the old installation. A list of the problem libraries\n"
- "| is in the file\n"
- "| \"%s\".\n\n", output_path);
+ "Your installation references loadable libraries that are missing from the\n"
+ "new installation. You can add these libraries to the new installation,\n"
+ "or remove the functions using them from the old installation. A list of\n"
+ "problem libraries is in the file:\n"
+ " %s\n\n", output_path);
}
else
check_ok();