Message improvements

This commit is contained in:
Peter Eisentraut 2014-10-12 01:02:56 -04:00
parent dc9c612767
commit b7a08c8028
8 changed files with 10 additions and 10 deletions

View File

@ -1186,7 +1186,7 @@ _bt_pagedel(Relation rel, Buffer buf)
(errcode(ERRCODE_INDEX_CORRUPTED), (errcode(ERRCODE_INDEX_CORRUPTED),
errmsg("index \"%s\" contains a half-dead internal page", errmsg("index \"%s\" contains a half-dead internal page",
RelationGetRelationName(rel)), 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); _bt_relbuf(rel, buf);
return ndeleted; return ndeleted;
} }

View File

@ -5193,8 +5193,8 @@ readRecoveryCommandFile(void)
else else
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid recovery_target parameter"), errmsg("invalid value for recovery parameter \"recovery_target\""),
errhint("The only allowed value is 'immediate'"))); errhint("The only allowed value is \"immediate\".")));
ereport(DEBUG2, ereport(DEBUG2,
(errmsg_internal("recovery_target = '%s'", (errmsg_internal("recovery_target = '%s'",
item->value))); item->value)));
@ -5257,7 +5257,7 @@ readRecoveryCommandFile(void)
"recovery_min_apply_delay"), "recovery_min_apply_delay"),
hintmsg ? errhint("%s", _(hintmsg)) : 0)); hintmsg ? errhint("%s", _(hintmsg)) : 0));
ereport(DEBUG2, ereport(DEBUG2,
(errmsg("recovery_min_apply_delay = '%s'", item->value))); (errmsg_internal("recovery_min_apply_delay = '%s'", item->value)));
} }
else else
ereport(FATAL, ereport(FATAL,

View File

@ -839,7 +839,7 @@ dropdb(const char *dbname, bool missing_ok)
if (ReplicationSlotsCountDBSlots(db_id, &nslots, &nslots_active)) if (ReplicationSlotsCountDBSlots(db_id, &nslots, &nslots_active))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_OBJECT_IN_USE), (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), dbname),
errdetail_plural("There is %d slot, %d of them active.", errdetail_plural("There is %d slot, %d of them active.",
"There are %d slots, %d of them active.", "There are %d slots, %d of them active.",

View File

@ -597,7 +597,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
{ {
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_CARDINALITY_VIOLATION), (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)), RelationGetRelationName(matviewRel)),
errdetail("Row: %s", errdetail("Row: %s",
SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1)))); SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1))));

View File

@ -9046,7 +9046,7 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation,
if (view_updatable_error) if (view_updatable_error)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (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))); errhint("%s", view_updatable_error)));
} }
} }

View File

@ -471,7 +471,7 @@ DefineView(ViewStmt *stmt, const char *queryString)
if (view_updatable_error) if (view_updatable_error)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (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))); errhint("%s", view_updatable_error)));
} }

View File

@ -614,7 +614,7 @@ be_tls_write(Port *port, void *ptr, size_t len)
if (retries >= 20) if (retries >= 20)
ereport(FATAL, ereport(FATAL,
(errcode(ERRCODE_PROTOCOL_VIOLATION), (errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("unable to complete SSL handshake"))); errmsg("could not complete SSL handshake on renegotiation, too many failures")));
} }
} }
} }

View File

@ -411,7 +411,7 @@ REFRESH MATERIALIZED VIEW mv;
ERROR: could not create unique index "mv_a_idx" ERROR: could not create unique index "mv_a_idx"
DETAIL: Key (a)=(1) is duplicated. DETAIL: Key (a)=(1) is duplicated.
REFRESH MATERIALIZED VIEW CONCURRENTLY mv; 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) DETAIL: Row: (1,10)
DROP TABLE foo CASCADE; DROP TABLE foo CASCADE;
NOTICE: drop cascades to materialized view mv NOTICE: drop cascades to materialized view mv