]> granicus.if.org Git - postgresql/commitdiff
Assorted message fixes and improvements
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 5 Sep 2014 05:20:33 +0000 (01:20 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 5 Sep 2014 05:25:27 +0000 (01:25 -0400)
contrib/test_decoding/expected/ddl.out
src/backend/access/heap/rewriteheap.c
src/backend/commands/dbcommands.c
src/backend/commands/matview.c
src/backend/commands/tablecmds.c
src/backend/executor/nodeWindowAgg.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/snapbuild.c
src/backend/replication/slot.c
src/backend/storage/ipc/dsm_impl.c
src/test/regress/expected/matview.out

index e1a4a590283abfcdd5be652b25a80dc591ddbccf..780120d7314ec1edc12a44c767c6f0de95e6fbf4 100644 (file)
@@ -12,7 +12,7 @@ ERROR:  replication slot "regression_slot" already exists
 -- fail because of an invalid name
 SELECT 'init' FROM pg_create_logical_replication_slot('Invalid Name', 'test_decoding');
 ERROR:  replication slot name "Invalid Name" contains invalid character
-HINT:  Replication slot names may only contain letters, numbers and the underscore character.
+HINT:  Replication slot names may only contain letters, numbers, and the underscore character.
 -- fail twice because of an invalid parameter values
 SELECT 'init' FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', 'frakbar');
 ERROR:  could not parse value "frakbar" for parameter "include-xids"
index 0fc9266e8bde7647a81d2d65d3f8e45b727ef2f4..951f3f1a489a1b173d507109e15574655ec981dd 100644 (file)
@@ -1161,7 +1161,7 @@ heap_xlog_logical_rewrite(XLogRecPtr lsn, XLogRecord *r)
        if (lseek(fd, xlrec->offset, SEEK_SET) != xlrec->offset)
                ereport(ERROR,
                                (errcode_for_file_access(),
-                                errmsg("could not seek to the end of file \"%s\": %m",
+                                errmsg("could not seek to end of file \"%s\": %m",
                                                path)));
 
        data = XLogRecGetData(r) + sizeof(*xlrec);
@@ -1255,7 +1255,7 @@ CheckPointLogicalRewriteHeap(void)
                        if (unlink(path) < 0)
                                ereport(ERROR,
                                                (errcode_for_file_access(),
-                                                errmsg("could not unlink file \"%s\": %m", path)));
+                                                errmsg("could not remove file \"%s\": %m", path)));
                }
                else
                {
index f480be884506efe602ce3b78d8f95c4a4e17021d..7831e900ba7c1c206a04eb6ff1f54498c13211fe 100644 (file)
@@ -841,8 +841,10 @@ dropdb(const char *dbname, bool missing_ok)
                                (errcode(ERRCODE_OBJECT_IN_USE),
                                 errmsg("database \"%s\" is used by a logical decoding slot",
                                                dbname),
-                                errdetail("There are %d slot(s), %d of them active",
-                                                  nslots, nslots_active)));
+                                errdetail_plural("There is %d slot, %d of them active.",
+                                                                 "There are %d slots, %d of them active.",
+                                                                 nslots,
+                                                                 nslots, nslots_active)));
 
        /*
         * Check for other backends in the target database.  (Because we hold the
index 783a527a9f40c048dce1aaea38b0ea563d4f2238..d1c8bb0d53679c3db0e58cd896b5dbf0db631868 100644 (file)
@@ -689,7 +689,7 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
                                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                           errmsg("cannot refresh materialized view \"%s\" concurrently",
                                          matviewname),
-                                errhint("Create a UNIQUE index with no WHERE clause on one or more columns of the materialized view.")));
+                                errhint("Create a unique index with no WHERE clause on one or more columns of the materialized view.")));
 
        appendStringInfoString(&querybuf,
                                                   " AND newdata OPERATOR(pg_catalog.*=) mv) "
index 0a679be24e7d5c4d2502b3b5831cb2420d194b20..7bc579bf4cea08a0ed63812824ff54b80da63d0b 100644 (file)
@@ -9424,7 +9424,7 @@ AlterTableMoveAll(AlterTableMoveAllStmt *stmt)
                        !ConditionalLockRelationOid(relOid, AccessExclusiveLock))
                        ereport(ERROR,
                                        (errcode(ERRCODE_OBJECT_IN_USE),
-                          errmsg("aborting due to \"%s\".\"%s\" --- lock not available",
+                          errmsg("aborting because lock on relation \"%s\".\"%s\" is not available",
                                          get_namespace_name(relForm->relnamespace),
                                          NameStr(relForm->relname))));
                else
index a0470d3eab2fe38b140a92128ab7960e34be113b..8657e2d39fef128402386303e91a9fd87b07d03f 100644 (file)
@@ -344,13 +344,13 @@ advance_windowaggregate(WindowAggState *winstate,
        winstate->curaggcontext = NULL;
 
        /*
-        * Moving-aggregate transition functions must not return NULL, see
+        * Moving-aggregate transition functions must not return null, see
         * advance_windowaggregate_base().
         */
        if (fcinfo->isnull && OidIsValid(peraggstate->invtransfn_oid))
                ereport(ERROR,
                                (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
-               errmsg("moving-aggregate transition function must not return NULL")));
+               errmsg("moving-aggregate transition function must not return null")));
 
        /*
         * We must track the number of rows included in transValue, since to
index 2b0929cb78bd8c19a6632fd3742f507814e94a67..ab09296763ae003bb9d810f172d3678ce62ffb84 100644 (file)
@@ -2350,7 +2350,7 @@ ReorderBufferRestoreCleanup(ReorderBuffer *rb, ReorderBufferTXN *txn)
                if (unlink(path) != 0 && errno != ENOENT)
                        ereport(ERROR,
                                        (errcode_for_file_access(),
-                                        errmsg("could not unlink file \"%s\": %m", path)));
+                                        errmsg("could not remove file \"%s\": %m", path)));
        }
 }
 
@@ -2407,7 +2407,7 @@ StartupReorderBuffer(void)
                                if (unlink(path) != 0)
                                        ereport(PANIC,
                                                        (errcode_for_file_access(),
-                                                        errmsg("could not unlink file \"%s\": %m",
+                                                        errmsg("could not remove file \"%s\": %m",
                                                                        path)));
                        }
                }
index f51d52d94efdaecee6ffe8837b1649978aa20e9c..5e59c6b819bb005e26edc6ed5c666d8fe017122b 100644 (file)
@@ -1506,7 +1506,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
        if (unlink(tmppath) != 0 && errno != ENOENT)
                ereport(ERROR,
                                (errcode_for_file_access(),
-                                errmsg("could not unlink file \"%s\": %m", path)));
+                                errmsg("could not remove file \"%s\": %m", path)));
 
        needed_length = sizeof(SnapBuildOnDisk) +
                sizeof(TransactionId) * builder->running.xcnt_space +
@@ -1857,7 +1857,7 @@ CheckPointSnapBuild(void)
                if (sscanf(snap_de->d_name, "%X-%X.snap", &hi, &lo) != 2)
                {
                        ereport(LOG,
-                                       (errmsg("could not parse filename \"%s\"", path)));
+                                       (errmsg("could not parse file name \"%s\"", path)));
                        continue;
                }
 
@@ -1877,7 +1877,7 @@ CheckPointSnapBuild(void)
                        {
                                ereport(LOG,
                                                (errcode_for_file_access(),
-                                                errmsg("could not unlink file \"%s\": %m",
+                                                errmsg("could not remove file \"%s\": %m",
                                                                path)));
                                continue;
                        }
index b374c6eccf501b3f1176ad113a21b2411fd0be5b..f355f13d293abb54aaa0e33204f30f418dbf9e43 100644 (file)
@@ -183,7 +183,7 @@ ReplicationSlotValidateName(const char *name, int elevel)
                                        (errcode(ERRCODE_INVALID_NAME),
                        errmsg("replication slot name \"%s\" contains invalid character",
                                   name),
-                                        errhint("Replication slot names may only contain letters, numbers and the underscore character.")));
+                                        errhint("Replication slot names may only contain letters, numbers, and the underscore character.")));
                        return false;
                }
        }
@@ -454,7 +454,7 @@ ReplicationSlotDropAcquired(void)
 
                ereport(fail_softly ? WARNING : ERROR,
                                (errcode_for_file_access(),
-                                errmsg("could not rename \"%s\" to \"%s\": %m",
+                                errmsg("could not rename file \"%s\" to \"%s\": %m",
                                                path, tmppath)));
        }
 
@@ -1041,7 +1041,7 @@ SaveSlotToPath(ReplicationSlot *slot, const char *dir, int elevel)
        {
                ereport(elevel,
                                (errcode_for_file_access(),
-                                errmsg("could not rename \"%s\" to \"%s\": %m",
+                                errmsg("could not rename file \"%s\" to \"%s\": %m",
                                                tmppath, path)));
                return;
        }
@@ -1092,7 +1092,7 @@ RestoreSlotFromDisk(const char *name)
        if (unlink(path) < 0 && errno != ENOENT)
                ereport(PANIC,
                                (errcode_for_file_access(),
-                                errmsg("could not unlink file \"%s\": %m", path)));
+                                errmsg("could not remove file \"%s\": %m", path)));
 
        sprintf(path, "pg_replslot/%s/state", name);
 
index 0819641ad96c119c7b72ae0c065070c1c61b3d54..af637dc999d9dcdbe50ed6102e8ab7cbb4d7b52e 100644 (file)
@@ -332,7 +332,7 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size,
 
                ereport(elevel,
                                (errcode_for_dynamic_shared_memory(),
-                errmsg("could not resize shared memory segment %s to %zu bytes: %m",
+                errmsg("could not resize shared memory segment \"%s\" to %zu bytes: %m",
                                name, request_size)));
                return false;
        }
@@ -875,7 +875,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size,
 
                ereport(elevel,
                                (errcode_for_dynamic_shared_memory(),
-                errmsg("could not resize shared memory segment %s to %zu bytes: %m",
+                errmsg("could not resize shared memory segment \"%s\" to %zu bytes: %m",
                                name, request_size)));
                return false;
        }
@@ -923,7 +923,7 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size,
 
                        ereport(elevel,
                                        (errcode_for_dynamic_shared_memory(),
-                                        errmsg("could not resize shared memory segment %s to %zu bytes: %m",
+                                        errmsg("could not resize shared memory segment \"%s\" to %zu bytes: %m",
                                                        name, request_size)));
                        return false;
                }
index b04cb9316973aafc4897288d2cbc9b9a57cb2603..1076b76210db3fbed29b4d1930e44c335097002d 100644 (file)
@@ -247,7 +247,7 @@ SELECT * FROM tvvm;
 REFRESH MATERIALIZED VIEW tmm;
 REFRESH MATERIALIZED VIEW CONCURRENTLY tvmm;
 ERROR:  cannot refresh materialized view "public.tvmm" concurrently
-HINT:  Create a UNIQUE index with no WHERE clause on one or more columns of the materialized view.
+HINT:  Create a unique index with no WHERE clause on one or more columns of the materialized view.
 REFRESH MATERIALIZED VIEW tvmm;
 REFRESH MATERIALIZED VIEW tvvm;
 EXPLAIN (costs off)