diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/transam/multixact.c | 4 | ||||
-rw-r--r-- | src/backend/catalog/dependency.c | 2 | ||||
-rw-r--r-- | src/backend/catalog/objectaddress.c | 2 | ||||
-rw-r--r-- | src/backend/commands/copy.c | 2 | ||||
-rw-r--r-- | src/backend/commands/matview.c | 2 | ||||
-rw-r--r-- | src/backend/commands/tablecmds.c | 2 | ||||
-rw-r--r-- | src/backend/commands/tablespace.c | 2 | ||||
-rw-r--r-- | src/backend/commands/vacuumlazy.c | 8 | ||||
-rw-r--r-- | src/backend/executor/execMain.c | 10 | ||||
-rw-r--r-- | src/backend/parser/parse_clause.c | 4 | ||||
-rw-r--r-- | src/backend/replication/logical/logicalfuncs.c | 2 | ||||
-rw-r--r-- | src/backend/replication/logical/origin.c | 16 | ||||
-rw-r--r-- | src/backend/replication/logical/snapbuild.c | 6 | ||||
-rw-r--r-- | src/backend/replication/slot.c | 6 | ||||
-rw-r--r-- | src/backend/tcop/postgres.c | 2 | ||||
-rw-r--r-- | src/backend/utils/adt/jsonb.c | 2 | ||||
-rw-r--r-- | src/backend/utils/adt/misc.c | 2 |
17 files changed, 40 insertions, 34 deletions
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 9571d0760a1..7d97085a1a6 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -1140,7 +1140,9 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) nmembers + MULTIXACT_MEMBERS_PER_PAGE * SLRU_PAGES_PER_SEGMENT * OFFSET_WARN_SEGMENTS)) ereport(WARNING, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("database with OID %u must be vacuumed before %d more multixact members are used", + errmsg_plural("database with OID %u must be vacuumed before %d more multixact member is used", + "database with OID %u must be vacuumed before %d more multixact members are used", + MultiXactState->offsetStopLimit - nextOffset + nmembers, MultiXactState->oldestMultiXactDB, MultiXactState->offsetStopLimit - nextOffset + nmembers), errhint("Execute a database-wide VACUUM in that database with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings."))); diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index 90b1cd835f8..efca34c66d7 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -1619,7 +1619,7 @@ find_expr_references_walker(Node *node, case REGROLEOID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("constant of the type \'regrole\' cannot be used here"))); + errmsg("constant of the type \"regrole\" cannot be used here"))); break; } } diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 052aab1003d..fc56f1ec3cf 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -1740,7 +1740,7 @@ get_object_address_defacl(List *objname, List *objargs, bool missing_ok) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("unrecognized default ACL object type %c", objtype), - errhint("Valid object types are 'r', 'S', 'f', and 'T'."))); + errhint("Valid object types are \"r\", \"S\", \"f\", and \"T\"."))); } /* diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index f409aa7393a..9a52ec6c3f8 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -875,7 +875,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("COPY FROM not supported with row level security."), - errhint("Use direct INSERT statements instead."))); + errhint("Use INSERT statements instead."))); /* Build target list */ cr = makeNode(ColumnRef); diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 5492e5985bf..745b76527d1 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -608,7 +608,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, */ ereport(ERROR, (errcode(ERRCODE_CARDINALITY_VIOLATION), - errmsg("new data for \"%s\" contains duplicate rows without any null columns", + errmsg("new data for materialized view \"%s\" contains duplicate rows without any null columns", RelationGetRelationName(matviewRel)), errdetail("Row: %s", SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1)))); diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 76793ef02a4..55ab2096cc3 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -9811,7 +9811,7 @@ AlterTableMoveAll(AlterTableMoveAllStmt *stmt) !ConditionalLockRelationOid(relOid, AccessExclusiveLock)) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("aborting because lock on relation \"%s\".\"%s\" is not available", + errmsg("aborting because lock on relation \"%s.%s\" is not available", get_namespace_name(relForm->relnamespace), NameStr(relForm->relname)))); else diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 7588b7ae264..18ae4ab10af 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -857,7 +857,7 @@ remove_tablespace_symlink(const char *linkloc) return; ereport(ERROR, (errcode_for_file_access(), - errmsg("could not stat \"%s\": %m", linkloc))); + errmsg("could not stat file \"%s\": %m", linkloc))); } if (S_ISDIR(st.st_mode)) diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index a01cfb4c043..24298894fae 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -1124,9 +1124,13 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, nkeep); appendStringInfo(&buf, _("There were %.0f unused item pointers.\n"), nunused); - appendStringInfo(&buf, _("Skipped %u pages due to buffer pins.\n"), + appendStringInfo(&buf, ngettext("Skipped %u page due to buffer pins.\n", + "Skipped %u pages due to buffer pins.\n", + vacrelstats->pinskipped_pages), vacrelstats->pinskipped_pages); - appendStringInfo(&buf, _("%u pages are entirely empty.\n"), + appendStringInfo(&buf, ngettext("%u page is entirely empty.\n", + "%u pages are entirely empty.\n", + empty_pages), empty_pages); appendStringInfo(&buf, _("%s."), pg_rusage_show(&ru0)); diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index a55022e0a80..9f2af6d0acd 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1832,7 +1832,7 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, ereport(ERROR, (errcode(ERRCODE_WITH_CHECK_OPTION_VIOLATION), - errmsg("new row violates WITH CHECK OPTION for \"%s\"", + errmsg("new row violates check option for view \"%s\"", wco->relname), val_desc ? errdetail("Failing row contains %s.", val_desc) : 0)); @@ -1842,24 +1842,24 @@ ExecWithCheckOptions(WCOKind kind, ResultRelInfo *resultRelInfo, if (wco->polname != NULL) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("new row violates row level security policy \"%s\" for \"%s\"", + errmsg("new row violates row-level security policy \"%s\" for table \"%s\"", wco->polname, wco->relname))); else ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("new row violates row level security policy for \"%s\"", + errmsg("new row violates row-level security policy for table \"%s\"", wco->relname))); break; case WCO_RLS_CONFLICT_CHECK: if (wco->polname != NULL) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("new row violates row level security policy \"%s\" (USING expression) for \"%s\"", + errmsg("new row violates row-level security policy \"%s\" (USING expression) for table \"%s\"", wco->polname, wco->relname))); else ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("new row violates row level security policy (USING expression) for \"%s\"", + errmsg("new row violates row-level security policy (USING expression) for table \"%s\"", wco->relname))); break; default: diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 59808568a52..9c2846dc337 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -2867,7 +2867,7 @@ transformOnConflictArbiter(ParseState *pstate, if (IsCatalogRelation(pstate->p_target_relation)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("ON CONFLICT not supported with system catalog tables"), + errmsg("ON CONFLICT is not supported with system catalog tables"), parser_errposition(pstate, exprLocation((Node *) onConflictClause)))); @@ -2875,7 +2875,7 @@ transformOnConflictArbiter(ParseState *pstate, if (RelationIsUsedAsCatalogTable(pstate->p_target_relation)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("ON CONFLICT not supported on table \"%s\" used as a catalog table", + errmsg("ON CONFLICT is not supported on table \"%s\" used as a catalog table", RelationGetRelationName(pstate->p_target_relation)), parser_errposition(pstate, exprLocation((Node *) onConflictClause)))); diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index a354a3f819f..012987a9727 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -403,7 +403,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin ctx->options.output_type !=OUTPUT_PLUGIN_TEXTUAL_OUTPUT) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("logical decoding output plugin \"%s\" produces binary output, but \"%s\" expects textual data", + errmsg("logical decoding output plugin \"%s\" produces binary output, but function \"%s\" expects textual data", NameStr(MyReplicationSlot->data.plugin), format_procedure(fcinfo->flinfo->fn_oid)))); diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index f55641bfb0d..8a3fb59e4ad 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -313,7 +313,7 @@ replorigin_create(char *roname) if (tuple == NULL) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("no free replication origin oid could be found"))); + errmsg("could not find free replication origin OID"))); heap_freetuple(tuple); return roident; @@ -350,7 +350,7 @@ replorigin_drop(RepOriginId roident) { ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("cannot drop replication origin with oid %d, in use by pid %d", + errmsg("could not drop replication origin with OID %d, in use by PID %d", state->roident, state->acquired_by))); } @@ -728,7 +728,7 @@ StartupReplicationOrigin(void) if (last_state == max_replication_slots) ereport(PANIC, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("no free replication state could be found, increase max_replication_slots"))); + errmsg("could not find free replication state, increase max_replication_slots"))); /* copy data to shared memory */ replication_states[last_state].roident = disk_state.roident; @@ -746,7 +746,7 @@ StartupReplicationOrigin(void) if (file_crc != crc) ereport(PANIC, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("replication_slot_checkpoint has wrong checksum %u, expected %u", + errmsg("replication slot checkpoint has wrong checksum %u, expected %u", crc, file_crc))); CloseTransientFile(fd); @@ -870,7 +870,7 @@ replorigin_advance(RepOriginId node, { ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("replication origin with oid %d is already active for pid %d", + errmsg("replication origin with OID %d is already active for PID %d", replication_state->roident, replication_state->acquired_by))); } @@ -881,7 +881,7 @@ replorigin_advance(RepOriginId node, if (replication_state == NULL && free_state == NULL) ereport(ERROR, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("no free replication state slot could be found for replication origin with oid %u", + errmsg("could not find free replication state slot for replication origin with OID %u", node), errhint("Increase max_replication_slots and try again."))); @@ -1049,7 +1049,7 @@ replorigin_session_setup(RepOriginId node) { ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("replication identifier %d is already active for pid %d", + errmsg("replication identifier %d is already active for PID %d", curstate->roident, curstate->acquired_by))); } @@ -1061,7 +1061,7 @@ replorigin_session_setup(RepOriginId node) if (session_replication_state == NULL && free_slot == -1) ereport(ERROR, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("no free replication state slot could be found for replication origin with oid %u", + errmsg("could not find free replication state slot for replication origin with OID %u", node), errhint("Increase max_replication_slots and try again."))); else if (session_replication_state == NULL) diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index a574cf365a3..ccc44faa625 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -1677,12 +1677,12 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn) if (ondisk.magic != SNAPBUILD_MAGIC) ereport(ERROR, - (errmsg("snapbuild state file \"%s\" has wrong magic %u instead of %u", + (errmsg("snapbuild state file \"%s\" has wrong magic number: %u instead of %u", path, ondisk.magic, SNAPBUILD_MAGIC))); if (ondisk.version != SNAPBUILD_VERSION) ereport(ERROR, - (errmsg("snapbuild state file \"%s\" has unsupported version %u instead of %u", + (errmsg("snapbuild state file \"%s\" has unsupported version: %u instead of %u", path, ondisk.version, SNAPBUILD_VERSION))); INIT_CRC32C(checksum); @@ -1738,7 +1738,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn) if (!EQ_CRC32C(checksum, ondisk.checksum)) ereport(ERROR, (errcode_for_file_access(), - errmsg("snapbuild state file %s: checksum mismatch, is %u, should be %u", + errmsg("checksum mismatch for snapbuild state file \"%s\": is %u, should be %u", path, checksum, ondisk.checksum))); /* diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index 92ec6326de1..c39e95767d7 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -344,7 +344,7 @@ ReplicationSlotAcquire(const char *name) if (active_pid != 0) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("replication slot \"%s\" is already active for pid %d", + errmsg("replication slot \"%s\" is already active for PID %d", name, active_pid))); /* We made this slot active, so it's ours now. */ @@ -1179,7 +1179,7 @@ RestoreSlotFromDisk(const char *name) if (cp.magic != SLOT_MAGIC) ereport(PANIC, (errcode_for_file_access(), - errmsg("replication slot file \"%s\" has wrong magic %u instead of %u", + errmsg("replication slot file \"%s\" has wrong magic number: %u instead of %u", path, cp.magic, SLOT_MAGIC))); /* verify version */ @@ -1223,7 +1223,7 @@ RestoreSlotFromDisk(const char *name) if (!EQ_CRC32C(checksum, cp.checksum)) ereport(PANIC, - (errmsg("replication slot file %s: checksum mismatch, is %u, should be %u", + (errmsg("checksum mismatch for replication slot file \"%s\": is %u, should be %u", path, checksum, cp.checksum))); /* diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index d30fe35c14f..cb580dc0a72 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -3900,7 +3900,7 @@ PostgresMain(int argc, char *argv[], if (pq_is_reading_msg()) ereport(FATAL, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("terminating connection because protocol sync was lost"))); + errmsg("terminating connection because protocol synchronization was lost"))); /* Now we can allow interrupts again */ RESUME_INTERRUPTS(); diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index d7b90b6108e..7cbb69faf2e 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -721,7 +721,7 @@ datum_to_jsonb(Datum val, bool is_null, JsonbInState *result, { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("key value must be scalar, not array, composite or json"))); + errmsg("key value must be scalar, not array, composite, or json"))); } else { diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index c0495d955ce..3ef6e43c4d0 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -168,7 +168,7 @@ pg_cancel_backend(PG_FUNCTION_ARGS) if (r == SIGNAL_BACKEND_NOPERMISSION) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - (errmsg("must be a member of the role whose query is being cancelled")))); + (errmsg("must be a member of the role whose query is being canceled")))); PG_RETURN_BOOL(r == SIGNAL_BACKEND_SUCCESS); } |