]> granicus.if.org Git - postgresql/commitdiff
Message style fixes
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 23 Sep 2019 11:37:33 +0000 (13:37 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 23 Sep 2019 11:38:39 +0000 (13:38 +0200)
contrib/test_decoding/expected/slot.out
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogfuncs.c
src/backend/catalog/pg_aggregate.c
src/backend/libpq/auth.c
src/backend/replication/basebackup.c
src/backend/replication/slotfuncs.c
src/backend/storage/file/fd.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/misc/guc.c
src/test/regress/expected/foreign_key.out

index 3da6b0be633fcf101db3f2480d2af27f5cdeaf04..1000171530f462f2628dc8bdd00a489a6360f8c8 100644 (file)
@@ -141,7 +141,7 @@ SELECT slot_name FROM pg_create_physical_replication_slot('regression_slot3');
 (1 row)
 
 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
 ERROR:  cannot advance replication slot that has not previously reserved WAL
 SELECT pg_drop_replication_slot('regression_slot3');
index b7ff004234a9c22fd858cb0edd9778170d33dff5..501f46fd52d557b429ff980a6cd5ca62cd1722ec 100644 (file)
@@ -11297,7 +11297,7 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
                        ereport(FATAL,
                                        (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                                         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)));
 
                ereport(DEBUG1,
index 8a70503228dd8a3808f0fe275ee508ac13219109..8f179887ab1eb109c222c841db348b8b8f778353 100644 (file)
@@ -726,7 +726,7 @@ pg_promote(PG_FUNCTION_ARGS)
        if (wait_seconds <= 0)
                ereport(ERROR,
                                (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 */
        promote_file = AllocateFile(PROMOTE_SIGNAL_FILE, "w");
index 201242e7965ccfb936087a5c33ba24efda0075f3..1ac235a0f401dc7196d5a3e90e3192446e706e77 100644 (file)
@@ -116,7 +116,7 @@ AggregateCreate(const char *aggName,
                elog(ERROR, "aggregate must have a transition function");
 
        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
@@ -711,7 +711,7 @@ AggregateCreate(const char *aggName,
                if (numDirectArgs != oldagg->aggnumdirectargs)
                        ereport(ERROR,
                                        (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_aggkind - 1] = false;
index 0e0a6d87528b3771057fee92cb10f07ff404fc74..3ef0171192f93bcbca7297b672dd9e00565011fc 100644 (file)
@@ -2859,7 +2859,7 @@ CheckCertAuth(Port *port)
                if (port->hba->clientcert == clientCertFull && port->hba->auth_method != uaCert)
                {
                        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)));
                }
        }
index f5f361c2093af9679adf78ef30b9406076246034..d0f210de8ca6be038208c97a96106796ebbf2246 100644 (file)
@@ -1442,7 +1442,7 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
                if (verify_checksum && (cnt % BLCKSZ != 0))
                {
                        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 "
                                                        "differ",
                                                        readfilename, blkno, (int) cnt, BLCKSZ)));
@@ -1599,8 +1599,10 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
        if (checksum_failures > 1)
        {
                ereport(WARNING,
-                               (errmsg("file \"%s\" has a total of %d checksum verification "
-                                               "failures", readfilename, checksum_failures)));
+                               (errmsg_plural("file \"%s\" has a total of %d checksum verification failure",
+                                                          "file \"%s\" has a total of %d checksum verification failures",
+                                                          checksum_failures,
+                                                          readfilename, checksum_failures)));
 
                pgstat_report_checksum_failures_in_db(dboid, checksum_failures);
        }
index 808a6f5b8362fd9dff9433fa656315018cd36411..42da6318238af5a8a0454daecddfc9e601b96b54 100644 (file)
@@ -523,7 +523,7 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
 
        if (XLogRecPtrIsInvalid(moveto))
                ereport(ERROR,
-                               (errmsg("invalid target wal lsn")));
+                               (errmsg("invalid target WAL LSN")));
 
        /* Build a tuple descriptor for our result type */
        if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
index 25107e8a290eaf997970b2b01ee3efe891f4743e..94be62fa6ece838a48de9de36f408ea4753fc993 100644 (file)
@@ -1686,7 +1686,7 @@ PathNameDeleteTemporaryFile(const char *path, bool error_on_failure)
                if (errno != ENOENT)
                        ereport(error_on_failure ? ERROR : LOG,
                                        (errcode_for_file_access(),
-                                        errmsg("cannot unlink temporary file \"%s\": %m",
+                                        errmsg("could not unlink temporary file \"%s\": %m",
                                                        path)));
                return false;
        }
@@ -3322,7 +3322,7 @@ unlink_if_exists_fname(const char *fname, bool isdir, int elevel)
                if (rmdir(fname) != 0 && errno != ENOENT)
                        ereport(elevel,
                                        (errcode_for_file_access(),
-                                        errmsg("could not rmdir directory \"%s\": %m", fname)));
+                                        errmsg("could not remove directory \"%s\": %m", fname)));
        }
        else
        {
index 8c895459c3750d15b2bd9d00b49aaedf09f2a57d..fb477d4fa017accc90d48b2b390c9fb09f004bf1 100644 (file)
@@ -2456,7 +2456,7 @@ ri_ReportViolation(const RI_ConstraintInfo *riinfo,
                                 errmsg("removing partition \"%s\" violates foreign key constraint \"%s\"",
                                                RelationGetRelationName(pk_rel),
                                                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,
                                                   RelationGetRelationName(fk_rel))));
        else if (onfk)
index 90ffd893394b89c3839bd92bebd4b103f306edbc..2178e1cf5e2972e86779d07d1d9aeb9628deff39 100644 (file)
@@ -1042,7 +1042,7 @@ static struct config_bool ConfigureNamesBool[] =
        },
        {
                {"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 "
                                                 "bounds to conditions in the query to determine which "
                                                 "partitions must be scanned."),
@@ -3493,7 +3493,7 @@ static struct config_string ConfigureNamesString[] =
 
        {
                {"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
                },
                &recovery_target_timeline_string,
@@ -3503,7 +3503,7 @@ static struct config_string ConfigureNamesString[] =
 
        {
                {"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
                },
                &recovery_target_string,
index f0ecf4b270d88b9c64487cd8526fd7cdabdd908d..894084f94f1458b1a24105df7ec12247b407054d 100644 (file)
@@ -2167,19 +2167,19 @@ INSERT into dropfk VALUES (1), (1000), (1500), (2000);
 -- these should all fail
 ALTER TABLE droppk DETACH PARTITION droppk_d;
 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;
 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;
 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;
 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;
 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
 DROP TABLE droppk_d;
 ERROR:  cannot drop table droppk_d because other objects depend on it