]> 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:37:33 +0000 (13:37 +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 13e0d2366f55480f25f805cf73dacaf5912dd457..0daab3ff4b713fda5a9577182aa05db918a29039 100644 (file)
@@ -11294,7 +11294,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 05704d337802f5af6c097bb949920f48b99322a9..89c98e5562888dcfb3f1099754cf4d7d991c7f64 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 7cab039dedcdf117761ca301f16bb5f7f5d8e63b..fd248a90ff46a66b77b2e084088ec853bc8aefb6 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 d7249e32da48ce6ce43963961d0997f6573ef686..cd4de4914ba93dcfc79fb99aa4f4f33ed28a9c41 100644 (file)
@@ -2864,7 +2864,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 2de86d6191461ecba735eba0dc16c5500b6cb232..a73893237a4e9148ddf397f8ac9698f46419723f 100644 (file)
@@ -1454,7 +1454,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)));
@@ -1611,8 +1611,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 6bfd4fa13ef75455ad50a645d9a11fa1de0f1d94..faa73061cf38e5724c90c830523818ee675b127c 100644 (file)
@@ -1688,7 +1688,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;
        }
@@ -3328,7 +3328,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 44a6eef5bbfd2c5a16eb6b9b4c82e466b68e010b..76cd0edb455ada52146c1f8d03f7a7cb2d4cf681 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 9a1948f952fee25186f4b829aceb7c4e87b13c52..f0ed326a1b7988e0f4cd6393b68c530175ddaa16 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