aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/dump.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/dump.c
parentafc9635c600ace716294a12d78abd37f65abd0ea (diff)
downloadpostgresql-912bc4f038b3daaea4477c4b4e79fbd8c15e67a0.tar.gz
postgresql-912bc4f038b3daaea4477c4b4e79fbd8c15e67a0.zip
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/dump.c')
-rw-r--r--contrib/pg_upgrade/dump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/pg_upgrade/dump.c b/contrib/pg_upgrade/dump.c
index aba95f44c95..a07ab12d8f4 100644
--- a/contrib/pg_upgrade/dump.c
+++ b/contrib/pg_upgrade/dump.c
@@ -56,13 +56,13 @@ split_old_dump(void)
snprintf(filename, sizeof(filename), "%s/%s", os_info.cwd, ALL_DUMP_FILE);
if ((all_dump = fopen(filename, "r")) == NULL)
- pg_log(PG_FATAL, "Cannot open dump file %s\n", filename);
+ pg_log(PG_FATAL, "Could not open dump file \"%s\": %s\n", filename, getErrorText(errno));
snprintf(filename, sizeof(filename), "%s/%s", os_info.cwd, GLOBALS_DUMP_FILE);
if ((globals_dump = fopen(filename, "w")) == NULL)
- pg_log(PG_FATAL, "Cannot write to dump file %s\n", filename);
+ pg_log(PG_FATAL, "Could not write to dump file \"%s\": %s\n", filename, getErrorText(errno));
snprintf(filename, sizeof(filename), "%s/%s", os_info.cwd, DB_DUMP_FILE);
if ((db_dump = fopen(filename, "w")) == NULL)
- pg_log(PG_FATAL, "Cannot write to dump file %s\n", filename);
+ pg_log(PG_FATAL, "Could not write to dump file \"%s\": %s\n", filename, getErrorText(errno));
current_output = globals_dump;
/* patterns used to prevent our own username from being recreated */