From: Peter Eisentraut Date: Sun, 12 Oct 2014 05:02:56 +0000 (-0400) Subject: Message improvements X-Git-Tag: REL9_4_RC1~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ce2a45aeb12d3d32a5b5e334f99a67264613fc1;p=postgresql Message improvements --- diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index bab5a49187..b71f65de2c 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -1186,7 +1186,7 @@ _bt_pagedel(Relation rel, Buffer buf) (errcode(ERRCODE_INDEX_CORRUPTED), errmsg("index \"%s\" contains a half-dead internal page", RelationGetRelationName(rel)), - errhint("This can be caused by an interrupt VACUUM in version 9.3 or older, before upgrade. Please REINDEX it."))); + errhint("This can be caused by an interrupted VACUUM in version 9.3 or older, before upgrade. Please REINDEX it."))); _bt_relbuf(rel, buf); return ndeleted; } diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index cfa4e3a00f..f8ed8eb517 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5204,8 +5204,8 @@ readRecoveryCommandFile(void) else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid recovery_target parameter"), - errhint("The only allowed value is 'immediate'"))); + errmsg("invalid value for recovery parameter \"recovery_target\""), + errhint("The only allowed value is \"immediate\"."))); ereport(DEBUG2, (errmsg_internal("recovery_target = '%s'", item->value))); @@ -5268,7 +5268,7 @@ readRecoveryCommandFile(void) "recovery_min_apply_delay"), hintmsg ? errhint("%s", _(hintmsg)) : 0)); ereport(DEBUG2, - (errmsg("recovery_min_apply_delay = '%s'", item->value))); + (errmsg_internal("recovery_min_apply_delay = '%s'", item->value))); } else ereport(FATAL, diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index ce674fe733..f1049d08f7 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -817,7 +817,7 @@ dropdb(const char *dbname, bool missing_ok) if (ReplicationSlotsCountDBSlots(db_id, &nslots, &nslots_active)) ereport(ERROR, (errcode(ERRCODE_OBJECT_IN_USE), - errmsg("database \"%s\" is used by a logical decoding slot", + errmsg("database \"%s\" is used by a logical replication slot", dbname), errdetail_plural("There is %d slot, %d of them active.", "There are %d slots, %d of them active.", diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 327587f2b7..93b972e9b8 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -588,7 +588,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 \"%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 ba9314b7de..fd350d2dec 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8945,7 +8945,7 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation, if (view_updatable_error) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("WITH CHECK OPTION is supported only on auto-updatable views"), + errmsg("WITH CHECK OPTION is supported only on automatically updatable views"), errhint("%s", view_updatable_error))); } } diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 9d0039c42a..184bcd0582 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -471,7 +471,7 @@ DefineView(ViewStmt *stmt, const char *queryString) if (view_updatable_error) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("WITH CHECK OPTION is supported only on auto-updatable views"), + errmsg("WITH CHECK OPTION is supported only on automatically updatable views"), errhint("%s", view_updatable_error))); } diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 59204cfe80..89c30d0654 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -381,7 +381,7 @@ secure_write(Port *port, void *ptr, size_t len) if (retries >= 20) ereport(FATAL, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("unable to complete SSL handshake"))); + errmsg("could not complete SSL handshake on renegotiation, too many failures"))); } } } diff --git a/src/test/regress/expected/matview.out b/src/test/regress/expected/matview.out index 1076b76210..b04510c599 100644 --- a/src/test/regress/expected/matview.out +++ b/src/test/regress/expected/matview.out @@ -411,7 +411,7 @@ REFRESH MATERIALIZED VIEW mv; ERROR: could not create unique index "mv_a_idx" DETAIL: Key (a)=(1) is duplicated. REFRESH MATERIALIZED VIEW CONCURRENTLY mv; -ERROR: new data for "mv" contains duplicate rows without any NULL columns +ERROR: new data for "mv" contains duplicate rows without any null columns DETAIL: Row: (1,10) DROP TABLE foo CASCADE; NOTICE: drop cascades to materialized view mv