Skip to content

Commit a8d585c

Browse files
committed
Message style improvements
Message style, plurals, quoting, spelling, consistency with similar messages
1 parent d455651 commit a8d585c

File tree

24 files changed

+101
-93
lines changed

24 files changed

+101
-93
lines changed

contrib/test_decoding/expected/binary.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'for
1414

1515
-- fails, binary plugin, textual consumer
1616
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'force-binary', '1', 'skip-empty-xacts', '1');
17-
ERROR: logical decoding output plugin "test_decoding" produces binary output, but "pg_logical_slot_get_changes(name,pg_lsn,integer,text[])" expects textual data
17+
ERROR: logical decoding output plugin "test_decoding" produces binary output, but function "pg_logical_slot_get_changes(name,pg_lsn,integer,text[])" expects textual data
1818
-- succeeds, textual plugin, binary consumer
1919
SELECT data FROM pg_logical_slot_get_binary_changes('regression_slot', NULL, NULL, 'force-binary', '0', 'skip-empty-xacts', '1');
2020
data

src/backend/access/transam/multixact.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
11401140
nmembers + MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT * OFFSET_WARN_SEGMENTS))
11411141
ereport(WARNING,
11421142
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
1143-
errmsg("database with OID %u must be vacuumed before %d more multixact members are used",
1143+
errmsg_plural("database with OID %u must be vacuumed before %d more multixact member is used",
1144+
"database with OID %u must be vacuumed before %d more multixact members are used",
1145+
MultiXactState->offsetStopLimit - nextOffset + nmembers,
11441146
MultiXactState->oldestMultiXactDB,
11451147
MultiXactState->offsetStopLimit - nextOffset + nmembers),
11461148
errhint("Execute a database-wide VACUUM in that database with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings.")));

src/backend/catalog/dependency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@ find_expr_references_walker(Node *node,
16191619
case REGROLEOID:
16201620
ereport(ERROR,
16211621
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1622-
errmsg("constant of the type \'regrole\' cannot be used here")));
1622+
errmsg("constant of the type \"regrole\" cannot be used here")));
16231623
break;
16241624
}
16251625
}

src/backend/catalog/objectaddress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ get_object_address_defacl(List *objname, List *objargs, bool missing_ok)
17401740
ereport(ERROR,
17411741
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
17421742
errmsg("unrecognized default ACL object type %c", objtype),
1743-
errhint("Valid object types are 'r', 'S', 'f', and 'T'.")));
1743+
errhint("Valid object types are \"r\", \"S\", \"f\", and \"T\".")));
17441744
}
17451745

17461746
/*

src/backend/commands/copy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
875875
ereport(ERROR,
876876
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
877877
errmsg("COPY FROM not supported with row level security."),
878-
errhint("Use direct INSERT statements instead.")));
878+
errhint("Use INSERT statements instead.")));
879879

880880
/* Build target list */
881881
cr = makeNode(ColumnRef);

src/backend/commands/matview.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
608608
*/
609609
ereport(ERROR,
610610
(errcode(ERRCODE_CARDINALITY_VIOLATION),
611-
errmsg("new data for \"%s\" contains duplicate rows without any null columns",
611+
errmsg("new data for materialized view \"%s\" contains duplicate rows without any null columns",
612612
RelationGetRelationName(matviewRel)),
613613
errdetail("Row: %s",
614614
SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1))));

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9811,7 +9811,7 @@ AlterTableMoveAll(AlterTableMoveAllStmt *stmt)
98119811
!ConditionalLockRelationOid(relOid, AccessExclusiveLock))
98129812
ereport(ERROR,
98139813
(errcode(ERRCODE_OBJECT_IN_USE),
9814-
errmsg("aborting because lock on relation \"%s\".\"%s\" is not available",
9814+
errmsg("aborting because lock on relation \"%s.%s\" is not available",
98159815
get_namespace_name(relForm->relnamespace),
98169816
NameStr(relForm->relname))));
98179817
else

src/backend/commands/tablespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ remove_tablespace_symlink(const char *linkloc)
857857
return;
858858
ereport(ERROR,
859859
(errcode_for_file_access(),
860-
errmsg("could not stat \"%s\": %m", linkloc)));
860+
errmsg("could not stat file \"%s\": %m", linkloc)));
861861
}
862862

863863
if (S_ISDIR(st.st_mode))

src/backend/commands/vacuumlazy.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,13 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
11241124
nkeep);
11251125
appendStringInfo(&buf, _("There were %.0f unused item pointers.\n"),
11261126
nunused);
1127-
appendStringInfo(&buf, _("Skipped %u pages due to buffer pins.\n"),
1127+
appendStringInfo(&buf, ngettext("Skipped %u page due to buffer pins.\n",
1128+
"Skipped %u pages due to buffer pins.\n",
1129+
vacrelstats->pinskipped_pages),
11281130
vacrelstats->pinskipped_pages);
1129-
appendStringInfo(&buf, _("%u pages are entirely empty.\n"),
1131+
appendStringInfo(&buf, ngettext("%u page is entirely empty.\n",
1132+
"%u pages are entirely empty.\n",
1133+
empty_pages),
11301134
empty_pages);
11311135
appendStringInfo(&buf, _("%s."),
11321136
pg_rusage_show(&ru0));

src/backend/executor/execMain.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
18321832

18331833
ereport(ERROR,
18341834
(errcode(ERRCODE_WITH_CHECK_OPTION_VIOLATION),
1835-
errmsg("new row violates WITH CHECK OPTION for \"%s\"",
1835+
errmsg("new row violates check option for view \"%s\"",
18361836
wco->relname),
18371837
val_desc ? errdetail("Failing row contains %s.",
18381838
val_desc) : 0));
@@ -1842,24 +1842,24 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo,
18421842
if (wco->polname != NULL)
18431843
ereport(ERROR,
18441844
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
1845-
errmsg("new row violates row level security policy \"%s\" for \"%s\"",
1845+
errmsg("new row violates row-level security policy \"%s\" for table \"%s\"",
18461846
wco->polname, wco->relname)));
18471847
else
18481848
ereport(ERROR,
18491849
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
1850-
errmsg("new row violates row level security policy for \"%s\"",
1850+
errmsg("new row violates row-level security policy for table \"%s\"",
18511851
wco->relname)));
18521852
break;
18531853
case WCO_RLS_CONFLICT_CHECK:
18541854
if (wco->polname != NULL)
18551855
ereport(ERROR,
18561856
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
1857-
errmsg("new row violates row level security policy \"%s\" (USING expression) for \"%s\"",
1857+
errmsg("new row violates row-level security policy \"%s\" (USING expression) for table \"%s\"",
18581858
wco->polname, wco->relname)));
18591859
else
18601860
ereport(ERROR,
18611861
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
1862-
errmsg("new row violates row level security policy (USING expression) for \"%s\"",
1862+
errmsg("new row violates row-level security policy (USING expression) for table \"%s\"",
18631863
wco->relname)));
18641864
break;
18651865
default:

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