Skip to content

Commit 26f7802

Browse files
committed
Message style improvements
1 parent a6bc330 commit 26f7802

29 files changed

+64
-68
lines changed

src/backend/access/transam/xlogprefetcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ check_recovery_prefetch(int *new_value, void **extra, GucSource source)
10891089
#ifndef USE_PREFETCH
10901090
if (*new_value == RECOVERY_PREFETCH_ON)
10911091
{
1092-
GUC_check_errdetail("recovery_prefetch not supported on platforms that lack posix_fadvise().");
1092+
GUC_check_errdetail("recovery_prefetch is not supported on platforms that lack posix_fadvise().");
10931093
return false;
10941094
}
10951095
#endif

src/backend/access/transam/xlogreader.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,10 +1963,10 @@ XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
19631963
blknum, NULL))
19641964
{
19651965
#ifndef FRONTEND
1966-
elog(ERROR, "failed to locate backup block with ID %d in WAL record",
1966+
elog(ERROR, "could not locate backup block with ID %d in WAL record",
19671967
block_id);
19681968
#else
1969-
pg_fatal("failed to locate backup block with ID %d in WAL record",
1969+
pg_fatal("could not locate backup block with ID %d in WAL record",
19701970
block_id);
19711971
#endif
19721972
}

src/backend/backup/basebackup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ parse_basebackup_options(List *options, basebackup_options *opt)
863863
if (!parse_compress_algorithm(optval, &opt->compression))
864864
ereport(ERROR,
865865
(errcode(ERRCODE_SYNTAX_ERROR),
866-
errmsg("unrecognized compression algorithm \"%s\"",
866+
errmsg("unrecognized compression algorithm: \"%s\"",
867867
optval)));
868868
o_compression = true;
869869
}
@@ -919,7 +919,7 @@ parse_basebackup_options(List *options, basebackup_options *opt)
919919
if (o_compression_detail && !o_compression)
920920
ereport(ERROR,
921921
(errcode(ERRCODE_SYNTAX_ERROR),
922-
errmsg("compression detail requires compression")));
922+
errmsg("compression detail cannot be specified unless compression is enabled")));
923923

924924
if (o_compression)
925925
{

src/backend/backup/basebackup_server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ bbsink_server_new(bbsink *next, char *pathname)
7272
if (!has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
7373
ereport(ERROR,
7474
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
75-
errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create server backup")));
75+
errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create backup stored on server")));
7676
CommitTransactionCommand();
7777

7878
/*
@@ -86,7 +86,7 @@ bbsink_server_new(bbsink *next, char *pathname)
8686
if (!is_absolute_path(pathname))
8787
ereport(ERROR,
8888
(errcode(ERRCODE_INVALID_NAME),
89-
errmsg("relative path not allowed for server backup")));
89+
errmsg("relative path not allowed for backup stored on server")));
9090

9191
switch (pg_check_dir(pathname))
9292
{

src/backend/catalog/pg_publication.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,13 @@ publication_translate_columns(Relation targetrel, List *columns,
513513
if (!AttrNumberIsForUserDefinedAttr(attnum))
514514
ereport(ERROR,
515515
errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
516-
errmsg("cannot reference system column \"%s\" in publication column list",
516+
errmsg("cannot use system column \"%s\" in publication column list",
517517
colname));
518518

519519
if (TupleDescAttr(tupdesc, attnum - 1)->attgenerated)
520520
ereport(ERROR,
521521
errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
522-
errmsg("cannot reference generated column \"%s\" in publication column list",
522+
errmsg("cannot use generated column \"%s\" in publication column list",
523523
colname));
524524

525525
if (bms_is_member(attnum, set))

src/backend/commands/dbcommands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
992992
else
993993
ereport(ERROR,
994994
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
995-
errmsg("invalid create database strategy %s", strategy),
995+
errmsg("invalid create database strategy \"%s\"", strategy),
996996
errhint("Valid strategies are \"wal_log\", and \"file_copy\".")));
997997
}
998998

src/backend/commands/publicationcmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
575575
/* OK, supported */
576576
break;
577577
default:
578-
errdetail_msg = _("Expressions only allow columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions.");
578+
errdetail_msg = _("Only columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions are allowed.");
579579
break;
580580
}
581581

@@ -1359,7 +1359,7 @@ CheckAlterPublication(AlterPublicationStmt *stmt, HeapTuple tup,
13591359
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
13601360
errmsg("publication \"%s\" is defined as FOR ALL TABLES",
13611361
NameStr(pubform->pubname)),
1362-
errdetail("Tables from schema cannot be added to, dropped from, or set on FOR ALL TABLES publications.")));
1362+
errdetail("Schemas cannot be added to or dropped from FOR ALL TABLES publications.")));
13631363

13641364
/* Check that user is allowed to manipulate the publication tables. */
13651365
if (tables && pubform->puballtables)

src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,8 @@ check_publications(WalReceiverConn *wrconn, List *publications)
461461

462462
if (res->status != WALRCV_OK_TUPLES)
463463
ereport(ERROR,
464-
errmsg_plural("could not receive publication from the publisher: %s",
465-
"could not receive list of publications from the publisher: %s",
466-
list_length(publications),
467-
res->err));
464+
errmsg("could not receive list of publications from the publisher: %s",
465+
res->err));
468466

469467
publicationsCopy = list_copy(publications);
470468

src/backend/commands/trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ renametrig(RenameStmt *stmt)
15321532
ereport(ERROR,
15331533
errmsg("cannot rename trigger \"%s\" on table \"%s\"",
15341534
stmt->subname, RelationGetRelationName(targetrel)),
1535-
errhint("Rename trigger on partitioned table \"%s\" instead.",
1535+
errhint("Rename the trigger on the partitioned table \"%s\" instead.",
15361536
get_rel_name(get_partition_parent(relid, false))));
15371537

15381538

src/backend/executor/nodeModifyTable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,10 +2082,10 @@ ExecCrossPartitionUpdateForeignKey(ModifyTableContext *context,
20822082
ereport(ERROR,
20832083
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
20842084
errmsg("cannot move tuple across partitions when a non-root ancestor of the source partition is directly referenced in a foreign key"),
2085-
errdetail("A foreign key points to ancestor \"%s\", but not the root ancestor \"%s\".",
2085+
errdetail("A foreign key points to ancestor \"%s\" but not the root ancestor \"%s\".",
20862086
RelationGetRelationName(rInfo->ri_RelationDesc),
20872087
RelationGetRelationName(rootRelInfo->ri_RelationDesc)),
2088-
errhint("Consider defining the foreign key on \"%s\".",
2088+
errhint("Consider defining the foreign key on table \"%s\".",
20892089
RelationGetRelationName(rootRelInfo->ri_RelationDesc))));
20902090
}
20912091

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy