Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8e7912e

Browse files
committed
Message style improvements
1 parent e5f8574 commit 8e7912e

File tree

11 files changed

+31
-30
lines changed

11 files changed

+31
-30
lines changed

src/backend/access/transam/xlogfuncs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ pg_log_standby_snapshot(PG_FUNCTION_ARGS)
212212
ereport(ERROR,
213213
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
214214
errmsg("recovery is in progress"),
215-
errhint("pg_log_standby_snapshot() cannot be executed during recovery.")));
215+
errhint("%s cannot be executed during recovery.",
216+
"pg_log_standby_snapshot()")));
216217

217218
if (!XLogStandbyInfoActive())
218219
ereport(ERROR,

src/bin/pg_basebackup/bbstreamer_zstd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ bbstreamer_zstd_compressor_new(bbstreamer *next, pg_compress_specification *comp
113113
compress->long_distance);
114114
if (ZSTD_isError(ret))
115115
{
116-
pg_log_error("could not set compression flag for %s: %s",
117-
"long", ZSTD_getErrorName(ret));
116+
pg_log_error("could not enable long-distance mode: %s",
117+
ZSTD_getErrorName(ret));
118118
exit(1);
119119
}
120120
}

src/bin/pg_dump/compress_lz4.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ WriteDataToArchiveLZ4(ArchiveHandle *AH, CompressorState *cs,
224224
data, chunk, NULL);
225225

226226
if (LZ4F_isError(status))
227-
pg_fatal("failed to LZ4 compress data: %s",
227+
pg_fatal("could not compress data: %s",
228228
LZ4F_getErrorName(status));
229229

230230
cs->writeF(AH, state->buffer, status);
@@ -256,14 +256,14 @@ EndCompressorLZ4(ArchiveHandle *AH, CompressorState *cs)
256256
state->buffer, state->buflen,
257257
NULL);
258258
if (LZ4F_isError(status))
259-
pg_fatal("failed to end compression: %s",
259+
pg_fatal("could not end compression: %s",
260260
LZ4F_getErrorName(status));
261261

262262
cs->writeF(AH, state->buffer, status);
263263

264264
status = LZ4F_freeCompressionContext(state->ctx);
265265
if (LZ4F_isError(status))
266-
pg_fatal("failed to end compression: %s",
266+
pg_fatal("could not end compression: %s",
267267
LZ4F_getErrorName(status));
268268

269269
pg_free(state->buffer);
@@ -677,7 +677,7 @@ LZ4Stream_close(CompressFileHandle *CFH)
677677
{
678678
status = LZ4F_compressEnd(state->ctx, state->buffer, state->buflen, NULL);
679679
if (LZ4F_isError(status))
680-
pg_fatal("failed to end compression: %s",
680+
pg_fatal("could not end compression: %s",
681681
LZ4F_getErrorName(status));
682682
else if (fwrite(state->buffer, 1, status, state->fp) != status)
683683
{
@@ -687,14 +687,14 @@ LZ4Stream_close(CompressFileHandle *CFH)
687687

688688
status = LZ4F_freeCompressionContext(state->ctx);
689689
if (LZ4F_isError(status))
690-
pg_fatal("failed to end compression: %s",
690+
pg_fatal("could not end compression: %s",
691691
LZ4F_getErrorName(status));
692692
}
693693
else
694694
{
695695
status = LZ4F_freeDecompressionContext(state->dtx);
696696
if (LZ4F_isError(status))
697-
pg_fatal("failed to end decompression: %s",
697+
pg_fatal("could not end decompression: %s",
698698
LZ4F_getErrorName(status));
699699
pg_free(state->overflowbuf);
700700
}

src/bin/pg_dump/pg_dump.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,18 +1064,18 @@ help(const char *progname)
10641064
printf(_(" -j, --jobs=NUM use this many parallel jobs to dump\n"));
10651065
printf(_(" -v, --verbose verbose mode\n"));
10661066
printf(_(" -V, --version output version information, then exit\n"));
1067-
printf(_(" -Z, --compress=METHOD[:LEVEL]\n"
1067+
printf(_(" -Z, --compress=METHOD[:DETAIL]\n"
10681068
" compress as specified\n"));
10691069
printf(_(" --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock\n"));
10701070
printf(_(" --no-sync do not wait for changes to be written safely to disk\n"));
10711071
printf(_(" -?, --help show this help, then exit\n"));
10721072

10731073
printf(_("\nOptions controlling the output content:\n"));
10741074
printf(_(" -a, --data-only dump only the data, not the schema\n"));
1075-
printf(_(" -b, --large-objects include large objects in dump\n"
1076-
" --blobs (same as --large-objects, deprecated)\n"));
1077-
printf(_(" -B, --no-large-objects exclude large objects in dump\n"
1078-
" --no-blobs (same as --no-large-objects, deprecated)\n"));
1075+
printf(_(" -b, --large-objects include large objects in dump\n"));
1076+
printf(_(" --blobs (same as --large-objects, deprecated)\n"));
1077+
printf(_(" -B, --no-large-objects exclude large objects in dump\n"));
1078+
printf(_(" --no-blobs (same as --no-large-objects, deprecated)\n"));
10791079
printf(_(" -c, --clean clean (drop) database objects before recreating\n"));
10801080
printf(_(" -C, --create include commands to create database in dump\n"));
10811081
printf(_(" -e, --extension=PATTERN dump the specified extension(s) only\n"));
@@ -1096,8 +1096,8 @@ help(const char *progname)
10961096
printf(_(" --enable-row-security enable row security (dump only content user has\n"
10971097
" access to)\n"));
10981098
printf(_(" --exclude-table-and-children=PATTERN\n"
1099-
" do NOT dump the specified table(s),\n"
1100-
" including child and partition tables\n"));
1099+
" do NOT dump the specified table(s), including\n"
1100+
" child and partition tables\n"));
11011101
printf(_(" --exclude-table-data=PATTERN do NOT dump data for the specified table(s)\n"));
11021102
printf(_(" --exclude-table-data-and-children=PATTERN\n"
11031103
" do NOT dump data for the specified table(s),\n"
@@ -1125,8 +1125,8 @@ help(const char *progname)
11251125
printf(_(" --snapshot=SNAPSHOT use given snapshot for the dump\n"));
11261126
printf(_(" --strict-names require table and/or schema include patterns to\n"
11271127
" match at least one entity each\n"));
1128-
printf(_(" --table-and-children=PATTERN dump only the specified table(s),\n"
1129-
" including child and partition tables\n"));
1128+
printf(_(" --table-and-children=PATTERN dump only the specified table(s), including\n"
1129+
" child and partition tables\n"));
11301130
printf(_(" --use-set-session-authorization\n"
11311131
" use SET SESSION AUTHORIZATION commands instead of\n"
11321132
" ALTER OWNER commands to set ownership\n"));

src/bin/pg_upgrade/check.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ check_for_aclitem_data_type_usage(ClusterInfo *cluster)
12151215
{
12161216
char output_path[MAXPGPATH];
12171217

1218-
prep_status("Checking for incompatible aclitem data type in user tables");
1218+
prep_status("Checking for incompatible \"aclitem\" data type in user tables");
12191219

12201220
snprintf(output_path, sizeof(output_path), "tables_using_aclitem.txt");
12211221

@@ -1312,7 +1312,7 @@ check_for_pg_role_prefix(ClusterInfo *cluster)
13121312
fclose(script);
13131313
pg_log(PG_REPORT, "fatal");
13141314
pg_fatal("Your installation contains roles starting with \"pg_\".\n"
1315-
"\"pg_\" is a reserved prefix for system roles, the cluster\n"
1315+
"\"pg_\" is a reserved prefix for system roles. The cluster\n"
13161316
"cannot be upgraded until these roles are renamed.\n"
13171317
"A list of roles starting with \"pg_\" is in the file:\n"
13181318
" %s", output_path);

src/bin/psql/command.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4525,7 +4525,7 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
45254525
popt->topt.expanded_header_exact_width = atoi(value);
45264526
if (popt->topt.expanded_header_exact_width == 0)
45274527
{
4528-
pg_log_error("\\pset: allowed xheader_width values are full (default), column, page, or a number specifying the exact width.");
4528+
pg_log_error("\\pset: allowed xheader_width values are \"%s\" (default), \"%s\", \"%s\", or a number specifying the exact width", "full", "column", "page");
45294529
return false;
45304530
}
45314531
}
@@ -4727,11 +4727,11 @@ printPsetInfo(const char *param, printQueryOpt *popt)
47274727
else if (strcmp(param, "xheader_width") == 0)
47284728
{
47294729
if (popt->topt.expanded_header_width_type == PRINT_XHEADER_FULL)
4730-
printf(_("Expanded header width is 'full'.\n"));
4730+
printf(_("Expanded header width is \"%s\".\n"), "full");
47314731
else if (popt->topt.expanded_header_width_type == PRINT_XHEADER_COLUMN)
4732-
printf(_("Expanded header width is 'column'.\n"));
4732+
printf(_("Expanded header width is \"%s\".\n"), "column");
47334733
else if (popt->topt.expanded_header_width_type == PRINT_XHEADER_PAGE)
4734-
printf(_("Expanded header width is 'page'.\n"));
4734+
printf(_("Expanded header width is \"%s\".\n"), "page");
47354735
else if (popt->topt.expanded_header_width_type == PRINT_XHEADER_EXACT_WIDTH)
47364736
printf(_("Expanded header width is %d.\n"), popt->topt.expanded_header_exact_width);
47374737
}

src/bin/psql/help.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ helpVariables(unsigned short int pager)
410410
HELP0(" ENCODING\n"
411411
" current client character set encoding\n");
412412
HELP0(" ERROR\n"
413-
" true if last query failed, else false\n");
413+
" \"true\" if last query failed, else \"false\"\n");
414414
HELP0(" FETCH_COUNT\n"
415415
" the number of result rows to fetch and display at a time (0 = unlimited)\n");
416416
HELP0(" HIDE_TABLEAM\n"
@@ -452,7 +452,7 @@ helpVariables(unsigned short int pager)
452452
" SERVER_VERSION_NUM\n"
453453
" server's version (in short string or numeric format)\n");
454454
HELP0(" SHELL_ERROR\n"
455-
" true if the last shell command failed, false if it succeeded\n");
455+
" \"true\" if the last shell command failed, \"false\" if it succeeded\n");
456456
HELP0(" SHELL_EXIT_CODE\n"
457457
" exit status of the last shell command\n");
458458
HELP0(" SHOW_ALL_RESULTS\n"

src/bin/scripts/createuser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ help(const char *progname)
433433
printf(_(" -s, --superuser role will be superuser\n"));
434434
printf(_(" -S, --no-superuser role will not be superuser (default)\n"));
435435
printf(_(" -v, --valid-until=TIMESTAMP\n"
436-
" password expiration date for role\n"));
436+
" password expiration date and time for role\n"));
437437
printf(_(" -V, --version output version information, then exit\n"));
438438
printf(_(" --interactive prompt for missing role name and attributes rather\n"
439439
" than using defaults\n"));

src/common/compression.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ expect_boolean_value(char *keyword, char *value, pg_compress_specification *resu
328328
return false;
329329

330330
result->parse_error =
331-
psprintf(_("value for compression option \"%s\" must be a boolean"),
331+
psprintf(_("value for compression option \"%s\" must be a Boolean value"),
332332
keyword);
333333
return false;
334334
}

src/common/rmtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ rmtree(const char *path, bool rmtopdir)
9292
default:
9393
if (unlink(pathbuf) != 0 && errno != ENOENT)
9494
{
95-
pg_log_warning("could not unlink file \"%s\": %m", pathbuf);
95+
pg_log_warning("could not remove file \"%s\": %m", pathbuf);
9696
result = false;
9797
}
9898
break;

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ connectOptions2(PGconn *conn)
15431543
&& strcmp(conn->sslmode, "verify-full") != 0)
15441544
{
15451545
conn->status = CONNECTION_BAD;
1546-
libpq_append_conn_error(conn, "weak sslmode \"%s\" may not be used with sslrootcert=system (use verify-full)",
1546+
libpq_append_conn_error(conn, "weak sslmode \"%s\" may not be used with sslrootcert=system (use \"verify-full\")",
15471547
conn->sslmode);
15481548
return false;
15491549
}

0 commit comments

Comments
 (0)