mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user