aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2014-09-05 01:20:33 -0400
committerPeter Eisentraut <peter_e@gmx.net>2014-09-05 01:24:29 -0400
commita6283f97069e6f747bdc2052e9f755a9136a5edc (patch)
treebf75781e87f58fc93ffa6cbc55be5aff2d6a3d14 /src/backend
parent7695f9701a8bf46bf385c96bce2e216ee2ccf93e (diff)
downloadpostgresql-a6283f97069e6f747bdc2052e9f755a9136a5edc.tar.gz
postgresql-a6283f97069e6f747bdc2052e9f755a9136a5edc.zip
Assorted message fixes and improvements
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/heap/rewriteheap.c4
-rw-r--r--src/backend/commands/dbcommands.c6
-rw-r--r--src/backend/commands/matview.c2
-rw-r--r--src/backend/commands/tablecmds.c2
-rw-r--r--src/backend/executor/nodeWindowAgg.c4
-rw-r--r--src/backend/replication/logical/reorderbuffer.c4
-rw-r--r--src/backend/replication/logical/snapbuild.c6
-rw-r--r--src/backend/replication/slot.c8
-rw-r--r--src/backend/storage/ipc/dsm_impl.c6
9 files changed, 22 insertions, 20 deletions
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index 0fc9266e8bd..951f3f1a489 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -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
{
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 5705889f31d..ce674fe7332 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -819,8 +819,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
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c
index 79dee7873cd..327587f2b7e 100644
--- a/src/backend/commands/matview.c
+++ b/src/backend/commands/matview.c
@@ -680,7 +680,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) "
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 34c38de3fff..ba9314b7ded 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9338,7 +9338,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
diff --git a/src/backend/executor/nodeWindowAgg.c b/src/backend/executor/nodeWindowAgg.c
index a0470d3eab2..8657e2d39fe 100644
--- a/src/backend/executor/nodeWindowAgg.c
+++ b/src/backend/executor/nodeWindowAgg.c
@@ -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
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 2b0929cb78b..ab09296763a 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -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)));
}
}
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 3319497603f..734fc2c5a52 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -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;
}
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index b374c6eccf5..f355f13d293 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -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);
diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c
index 0819641ad96..af637dc999d 100644
--- a/src/backend/storage/ipc/dsm_impl.c
+++ b/src/backend/storage/ipc/dsm_impl.c
@@ -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;
}