diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2011-07-12 07:13:51 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2011-07-12 07:13:51 +0300 |
commit | 912bc4f038b3daaea4477c4b4e79fbd8c15e67a0 (patch) | |
tree | 3abbc8e1ae427b65afc1566f63b31d88c41826d2 /contrib/pg_upgrade/version.c | |
parent | afc9635c600ace716294a12d78abd37f65abd0ea (diff) | |
download | postgresql-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/version.c')
-rw-r--r-- | contrib/pg_upgrade/version.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/contrib/pg_upgrade/version.c b/contrib/pg_upgrade/version.c index 958bcbb80fe..46190b11543 100644 --- a/contrib/pg_upgrade/version.c +++ b/contrib/pg_upgrade/version.c @@ -49,7 +49,7 @@ new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, bool check_mode) if (!check_mode) { if (script == NULL && (script = fopen(output_path, "w")) == NULL) - pg_log(PG_FATAL, "could not create necessary file: %s\n", output_path); + pg_log(PG_FATAL, "could not open file \"%s\": %s\n", output_path, getErrorText(errno)); fprintf(script, "\\connect %s\n", quote_identifier(active_db->db_name)); fprintf(script, @@ -70,20 +70,18 @@ new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, bool check_mode) report_status(PG_WARNING, "warning"); if (check_mode) pg_log(PG_WARNING, "\n" - "| Your installation contains large objects.\n" - "| The new database has an additional large object\n" - "| permission table. After upgrading, you will be\n" - "| given a command to populate the pg_largeobject\n" - "| permission table with default permissions.\n\n"); + "Your installation contains large objects. The new database has an\n" + "additional large object permission table. After upgrading, you will be\n" + "given a command to populate the pg_largeobject permission table with\n" + "default permissions.\n\n"); else pg_log(PG_WARNING, "\n" - "| Your installation contains large objects.\n" - "| The new database has an additional large object\n" - "| permission table so default permissions must be\n" - "| defined for all large objects. The file:\n" - "| \t%s\n" - "| when executed by psql by the database super-user\n" - "| will define the default permissions.\n\n", + "Your installation contains large objects. The new database has an\n" + "additional large object permission table, so default permissions must be\n" + "defined for all large objects. The file\n" + " %s\n" + "when executed by psql by the database superuser will set the default\n" + "permissions.\n\n", output_path); } else |