Message style fixes

This commit is contained in:
Peter Eisentraut 2019-09-23 13:37:33 +02:00
parent 467c1d9107
commit 887248e97e
11 changed files with 23 additions and 21 deletions

View File

@ -141,7 +141,7 @@ SELECT slot_name FROM pg_create_physical_replication_slot('regression_slot3');
(1 row) (1 row)
SELECT pg_replication_slot_advance('regression_slot3', '0/0'); -- invalid LSN SELECT pg_replication_slot_advance('regression_slot3', '0/0'); -- invalid LSN
ERROR: invalid target wal lsn ERROR: invalid target WAL LSN
SELECT pg_replication_slot_advance('regression_slot3', '0/1'); -- error SELECT pg_replication_slot_advance('regression_slot3', '0/1'); -- error
ERROR: cannot advance replication slot that has not previously reserved WAL ERROR: cannot advance replication slot that has not previously reserved WAL
SELECT pg_drop_replication_slot('regression_slot3'); SELECT pg_drop_replication_slot('regression_slot3');

View File

@ -11297,7 +11297,7 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
ereport(FATAL, ereport(FATAL,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("invalid data in file \"%s\"", BACKUP_LABEL_FILE), errmsg("invalid data in file \"%s\"", BACKUP_LABEL_FILE),
errdetail("Timeline ID parsed is %u, but expected %u", errdetail("Timeline ID parsed is %u, but expected %u.",
tli_from_file, tli_from_walseg))); tli_from_file, tli_from_walseg)));
ereport(DEBUG1, ereport(DEBUG1,

View File

@ -726,7 +726,7 @@ pg_promote(PG_FUNCTION_ARGS)
if (wait_seconds <= 0) if (wait_seconds <= 0)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("\"wait_seconds\" cannot be negative or equal zero"))); errmsg("\"wait_seconds\" must not be negative or zero")));
/* create the promote signal file */ /* create the promote signal file */
promote_file = AllocateFile(PROMOTE_SIGNAL_FILE, "w"); promote_file = AllocateFile(PROMOTE_SIGNAL_FILE, "w");

View File

@ -116,7 +116,7 @@ AggregateCreate(const char *aggName,
elog(ERROR, "aggregate must have a transition function"); elog(ERROR, "aggregate must have a transition function");
if (numDirectArgs < 0 || numDirectArgs > numArgs) if (numDirectArgs < 0 || numDirectArgs > numArgs)
elog(ERROR, "incorrect number of direct args for aggregate"); elog(ERROR, "incorrect number of direct arguments for aggregate");
/* /*
* Aggregates can have at most FUNC_MAX_ARGS-1 args, else the transfn * Aggregates can have at most FUNC_MAX_ARGS-1 args, else the transfn
@ -711,7 +711,7 @@ AggregateCreate(const char *aggName,
if (numDirectArgs != oldagg->aggnumdirectargs) if (numDirectArgs != oldagg->aggnumdirectargs)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
errmsg("cannot change number of direct args of an aggregate function"))); errmsg("cannot change number of direct arguments of an aggregate function")));
replaces[Anum_pg_aggregate_aggfnoid - 1] = false; replaces[Anum_pg_aggregate_aggfnoid - 1] = false;
replaces[Anum_pg_aggregate_aggkind - 1] = false; replaces[Anum_pg_aggregate_aggkind - 1] = false;

View File

@ -2859,7 +2859,7 @@ CheckCertAuth(Port *port)
if (port->hba->clientcert == clientCertFull && port->hba->auth_method != uaCert) if (port->hba->clientcert == clientCertFull && port->hba->auth_method != uaCert)
{ {
ereport(LOG, ereport(LOG,
(errmsg("certificate validation (clientcert=verify-full) failed for user \"%s\": cn mismatch", (errmsg("certificate validation (clientcert=verify-full) failed for user \"%s\": CN mismatch",
port->user_name))); port->user_name)));
} }
} }

View File

@ -1442,7 +1442,7 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
if (verify_checksum && (cnt % BLCKSZ != 0)) if (verify_checksum && (cnt % BLCKSZ != 0))
{ {
ereport(WARNING, ereport(WARNING,
(errmsg("cannot verify checksum in file \"%s\", block " (errmsg("could not verify checksum in file \"%s\", block "
"%d: read buffer size %d and page size %d " "%d: read buffer size %d and page size %d "
"differ", "differ",
readfilename, blkno, (int) cnt, BLCKSZ))); readfilename, blkno, (int) cnt, BLCKSZ)));
@ -1599,8 +1599,10 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
if (checksum_failures > 1) if (checksum_failures > 1)
{ {
ereport(WARNING, ereport(WARNING,
(errmsg("file \"%s\" has a total of %d checksum verification " (errmsg_plural("file \"%s\" has a total of %d checksum verification failure",
"failures", readfilename, checksum_failures))); "file \"%s\" has a total of %d checksum verification failures",
checksum_failures,
readfilename, checksum_failures)));
pgstat_report_checksum_failures_in_db(dboid, checksum_failures); pgstat_report_checksum_failures_in_db(dboid, checksum_failures);
} }

View File

@ -523,7 +523,7 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
if (XLogRecPtrIsInvalid(moveto)) if (XLogRecPtrIsInvalid(moveto))
ereport(ERROR, ereport(ERROR,
(errmsg("invalid target wal lsn"))); (errmsg("invalid target WAL LSN")));
/* Build a tuple descriptor for our result type */ /* Build a tuple descriptor for our result type */
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)

View File

@ -1686,7 +1686,7 @@ PathNameDeleteTemporaryFile(const char *path, bool error_on_failure)
if (errno != ENOENT) if (errno != ENOENT)
ereport(error_on_failure ? ERROR : LOG, ereport(error_on_failure ? ERROR : LOG,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("cannot unlink temporary file \"%s\": %m", errmsg("could not unlink temporary file \"%s\": %m",
path))); path)));
return false; return false;
} }
@ -3322,7 +3322,7 @@ unlink_if_exists_fname(const char *fname, bool isdir, int elevel)
if (rmdir(fname) != 0 && errno != ENOENT) if (rmdir(fname) != 0 && errno != ENOENT)
ereport(elevel, ereport(elevel,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not rmdir directory \"%s\": %m", fname))); errmsg("could not remove directory \"%s\": %m", fname)));
} }
else else
{ {

View File

@ -2456,7 +2456,7 @@ ri_ReportViolation(const RI_ConstraintInfo *riinfo,
errmsg("removing partition \"%s\" violates foreign key constraint \"%s\"", errmsg("removing partition \"%s\" violates foreign key constraint \"%s\"",
RelationGetRelationName(pk_rel), RelationGetRelationName(pk_rel),
NameStr(riinfo->conname)), NameStr(riinfo->conname)),
errdetail("Key (%s)=(%s) still referenced from table \"%s\".", errdetail("Key (%s)=(%s) is still referenced from table \"%s\".",
key_names.data, key_values.data, key_names.data, key_values.data,
RelationGetRelationName(fk_rel)))); RelationGetRelationName(fk_rel))));
else if (onfk) else if (onfk)

View File

@ -1042,7 +1042,7 @@ static struct config_bool ConfigureNamesBool[] =
}, },
{ {
{"enable_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD, {"enable_partition_pruning", PGC_USERSET, QUERY_TUNING_METHOD,
gettext_noop("Enable plan-time and run-time partition pruning."), gettext_noop("Enables plan-time and run-time partition pruning."),
gettext_noop("Allows the query planner and executor to compare partition " gettext_noop("Allows the query planner and executor to compare partition "
"bounds to conditions in the query to determine which " "bounds to conditions in the query to determine which "
"partitions must be scanned."), "partitions must be scanned."),
@ -3493,7 +3493,7 @@ static struct config_string ConfigureNamesString[] =
{ {
{"recovery_target_timeline", PGC_POSTMASTER, WAL_RECOVERY_TARGET, {"recovery_target_timeline", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
gettext_noop("Specifies the timeline to recovery into."), gettext_noop("Specifies the timeline to recover into."),
NULL NULL
}, },
&recovery_target_timeline_string, &recovery_target_timeline_string,
@ -3503,7 +3503,7 @@ static struct config_string ConfigureNamesString[] =
{ {
{"recovery_target", PGC_POSTMASTER, WAL_RECOVERY_TARGET, {"recovery_target", PGC_POSTMASTER, WAL_RECOVERY_TARGET,
gettext_noop("Set to 'immediate' to end recovery as soon as a consistent state is reached."), gettext_noop("Set to \"immediate\" to end recovery as soon as a consistent state is reached."),
NULL NULL
}, },
&recovery_target_string, &recovery_target_string,

View File

@ -2167,19 +2167,19 @@ INSERT into dropfk VALUES (1), (1000), (1500), (2000);
-- these should all fail -- these should all fail
ALTER TABLE droppk DETACH PARTITION droppk_d; ALTER TABLE droppk DETACH PARTITION droppk_d;
ERROR: removing partition "droppk_d" violates foreign key constraint "dropfk_a_fkey5" ERROR: removing partition "droppk_d" violates foreign key constraint "dropfk_a_fkey5"
DETAIL: Key (a)=(2000) still referenced from table "dropfk". DETAIL: Key (a)=(2000) is still referenced from table "dropfk".
ALTER TABLE droppk2 DETACH PARTITION droppk2_d; ALTER TABLE droppk2 DETACH PARTITION droppk2_d;
ERROR: removing partition "droppk2_d" violates foreign key constraint "dropfk_a_fkey4" ERROR: removing partition "droppk2_d" violates foreign key constraint "dropfk_a_fkey4"
DETAIL: Key (a)=(1500) still referenced from table "dropfk". DETAIL: Key (a)=(1500) is still referenced from table "dropfk".
ALTER TABLE droppk DETACH PARTITION droppk1; ALTER TABLE droppk DETACH PARTITION droppk1;
ERROR: removing partition "droppk1" violates foreign key constraint "dropfk_a_fkey1" ERROR: removing partition "droppk1" violates foreign key constraint "dropfk_a_fkey1"
DETAIL: Key (a)=(1) still referenced from table "dropfk". DETAIL: Key (a)=(1) is still referenced from table "dropfk".
ALTER TABLE droppk DETACH PARTITION droppk2; ALTER TABLE droppk DETACH PARTITION droppk2;
ERROR: removing partition "droppk2" violates foreign key constraint "dropfk_a_fkey2" ERROR: removing partition "droppk2" violates foreign key constraint "dropfk_a_fkey2"
DETAIL: Key (a)=(1000) still referenced from table "dropfk". DETAIL: Key (a)=(1000) is still referenced from table "dropfk".
ALTER TABLE droppk2 DETACH PARTITION droppk21; ALTER TABLE droppk2 DETACH PARTITION droppk21;
ERROR: removing partition "droppk21" violates foreign key constraint "dropfk_a_fkey3" ERROR: removing partition "droppk21" violates foreign key constraint "dropfk_a_fkey3"
DETAIL: Key (a)=(1000) still referenced from table "dropfk". DETAIL: Key (a)=(1000) is still referenced from table "dropfk".
-- dropping partitions is disallowed -- dropping partitions is disallowed
DROP TABLE droppk_d; DROP TABLE droppk_d;
ERROR: cannot drop table droppk_d because other objects depend on it ERROR: cannot drop table droppk_d because other objects depend on it