summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2005-10-29 00:31:52 +0000
committerPeter Eisentraut2005-10-29 00:31:52 +0000
commit3fb0bf69fcb2e8f956e2ab711d921ae8bd79e20d (patch)
tree3bf8784c9aa51ae1852cfdccad6502e02053b197
parent2029fb2efb95cd7ebd6b19287ec3b19f3748c2c7 (diff)
Message corrections
-rw-r--r--src/backend/access/transam/twophase.c2
-rw-r--r--src/backend/access/transam/varsup.c4
-rw-r--r--src/backend/access/transam/xlog.c4
-rw-r--r--src/backend/catalog/pg_proc.c2
-rw-r--r--src/backend/commands/cluster.c15
-rw-r--r--src/backend/commands/user.c2
-rw-r--r--src/backend/storage/freespace/freespace.c6
-rw-r--r--src/backend/storage/lmgr/deadlock.c2
-rw-r--r--src/backend/utils/adt/dbsize.c6
-rw-r--r--src/backend/utils/adt/genfile.c2
-rw-r--r--src/backend/utils/adt/oracle_compat.c2
-rw-r--r--src/backend/utils/adt/varlena.c7
-rw-r--r--src/backend/utils/mb/conv.c2
-rw-r--r--src/backend/utils/mb/wchar.c2
-rw-r--r--src/backend/utils/misc/guc.c2
-rw-r--r--src/port/copydir.c2
16 files changed, 30 insertions, 32 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 1e5c7814fa..6326f7d6b5 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -904,7 +904,7 @@ EndPrepare(GlobalTransaction gxact)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not seek twophase state file: %m")));
+ errmsg("could not seek in twophase state file: %m")));
}
/*
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index 8881c6cc03..c97950212c 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -66,9 +66,9 @@ GetNewTransactionId(bool isSubXact)
TransactionIdFollowsOrEquals(xid, ShmemVariableCache->xidStopLimit))
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("database is not accepting queries to avoid wraparound data loss in database \"%s\"",
+ errmsg("database is not accepting commands to avoid wraparound data loss in database \"%s\"",
NameStr(ShmemVariableCache->limit_datname)),
- errhint("Stop the postmaster and use a standalone backend to VACUUM database \"%s\".",
+ errhint("Stop the postmaster and use a standalone backend to vacuum database \"%s\".",
NameStr(ShmemVariableCache->limit_datname))));
else
ereport(WARNING,
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index f5f0624dcc..da170a8e5f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1468,7 +1468,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
ereport(PANIC,
(errcode_for_file_access(),
errmsg("could not write to log file %u, segment %u "
- "at offset %u length %lu: %m",
+ "at offset %u, length %lu: %m",
openLogId, openLogSeg,
openLogOff, (unsigned long) nbytes)));
}
@@ -3558,7 +3558,7 @@ ReadControlFile(void)
if (ControlFile->floatFormat != FLOATFORMAT_VALUE)
ereport(FATAL,
(errmsg("database files are incompatible with server"),
- errdetail("The database cluster appears to use a different floating-point format than the server executable."),
+ errdetail("The database cluster appears to use a different floating-point number format than the server executable."),
errhint("It looks like you need to initdb.")));
if (ControlFile->blcksz != BLCKSZ)
ereport(FATAL,
diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c
index 389eb1d8fb..e53887fad2 100644
--- a/src/backend/catalog/pg_proc.c
+++ b/src/backend/catalog/pg_proc.c
@@ -186,7 +186,7 @@ ProcedureCreate(const char *procedureName,
if ((returnType == INTERNALOID || internalOutParam) && !internalInParam)
ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
- errmsg("unsafe use of INTERNAL pseudo-type"),
+ errmsg("unsafe use of pseudo-type \"internal\""),
errdetail("A function returning \"internal\" must have at least one \"internal\" argument.")));
/*
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 644f30094f..50c766dacb 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -356,13 +356,13 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck)
if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot cluster on index \"%s\" because access method\n"
- "does not handle null values",
+ errmsg("cannot cluster on index \"%s\" because access method does not handle null values",
RelationGetRelationName(OldIndex)),
- errhint("You may be able to work around this by marking column \"%s\" NOT NULL%s",
- NameStr(OldHeap->rd_att->attrs[colno - 1]->attname),
- recheck ? ",\nor use ALTER TABLE ... SET WITHOUT CLUSTER to remove the cluster\n"
- "specification from the table." : ".")));
+ recheck
+ ? errhint("You may be able to work around this by marking column \"%s\" NOT NULL, or use ALTER TABLE ... SET WITHOUT CLUSTER to remove the cluster specification from the table.",
+ NameStr(OldHeap->rd_att->attrs[colno - 1]->attname))
+ : errhint("You may be able to work around this by marking column \"%s\" NOT NULL.",
+ NameStr(OldHeap->rd_att->attrs[colno - 1]->attname))));
}
else if (colno < 0)
{
@@ -372,8 +372,7 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck)
/* index expression, lose... */
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot cluster on expressional index \"%s\" because its index access\n"
- "method does not handle null values",
+ errmsg("cannot cluster on expressional index \"%s\" because its index access method does not handle null values",
RelationGetRelationName(OldIndex))));
}
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 3d2034a7b2..0cbe8252cf 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -1194,7 +1194,7 @@ AddRoleMems(const char *rolename, Oid roleid,
if (grantorId != GetUserId() && !superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser to set grantor ID")));
+ errmsg("must be superuser to set grantor")));
/* We need only regular writer's lock on pg_auth_members */
pg_authmem_rel = heap_open(AuthMemRelationId, RowExclusiveLock);
diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c
index 116ea97336..9fdf964e65 100644
--- a/src/backend/storage/freespace/freespace.c
+++ b/src/backend/storage/freespace/freespace.c
@@ -726,14 +726,14 @@ CheckFreeSpaceMapStatistics(int elevel, int numRels, double needed)
ereport(elevel,
(errmsg("max_fsm_relations(%d) equals the number of relations checked",
MaxFSMRelations),
- errhint("You have >= %d relations.\n"
+ errhint("You have at least %d relations. "
"Consider increasing the configuration parameter \"max_fsm_relations\".",
numRels)));
else if (needed > MaxFSMPages)
ereport(elevel,
- (errmsg("the number of page slots needed (%.0f) exceeds max_fsm_pages (%d)",
+ (errmsg("number of page slots needed (%.0f) exceeds max_fsm_pages (%d)",
needed, MaxFSMPages),
- errhint("Consider increasing the configuration parameter \"max_fsm_pages\"\n"
+ errhint("Consider increasing the configuration parameter \"max_fsm_pages\" "
"to a value over %.0f.", needed)));
}
diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c
index ef201a9f06..d2b703bfd4 100644
--- a/src/backend/storage/lmgr/deadlock.c
+++ b/src/backend/storage/lmgr/deadlock.c
@@ -888,7 +888,7 @@ DescribeLockTag(StringInfo buf, const LOCKTAG *lock)
break;
default:
appendStringInfo(buf,
- _("unknown locktag type %d"),
+ _("unrecognized locktag type %d"),
lock->locktag_type);
break;
}
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index 59dc918688..fb2481abb8 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -53,7 +53,7 @@ db_dir_size(const char *path)
if (stat(filename, &fst) < 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not stat \"%s\": %m", filename)));
+ errmsg("could not stat file \"%s\": %m", filename)));
dirsize += fst.st_size;
}
@@ -175,7 +175,7 @@ calculate_tablespace_size(Oid tblspcOid)
if (stat(pathname, &fst) < 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not stat \"%s\": %m", pathname)));
+ errmsg("could not stat file \"%s\": %m", pathname)));
if (fst.st_mode & S_IFDIR)
totalsize += db_dir_size(pathname);
@@ -251,7 +251,7 @@ calculate_relation_size(RelFileNode *rfn)
else
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not stat \"%s\": %m", pathname)));
+ errmsg("could not stat file \"%s\": %m", pathname)));
}
totalsize += fst.st_size;
}
diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c
index edb8a9fa28..276f78a0c6 100644
--- a/src/backend/utils/adt/genfile.c
+++ b/src/backend/utils/adt/genfile.c
@@ -122,7 +122,7 @@ pg_read_file(PG_FUNCTION_ARGS)
if (bytes_to_read < 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("requested length cannot be negative")));
+ errmsg("requested length may not be negative")));
/* not sure why anyone thought that int64 length was a good idea */
if (bytes_to_read > (MaxAllocSize - VARHDRSZ))
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index 02c8c6b769..95ea8a21a4 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -214,7 +214,7 @@ win32_utf8_wcstotext(const wchar_t *str)
if (nbytes == 0) /* shouldn't happen */
ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
- errmsg("UTF16 to UTF8 translation failed: %lu",
+ errmsg("UTF-16 to UTF-8 translation failed: %lu",
GetLastError())));
result = palloc(nbytes + VARHDRSZ);
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 9a3c85b6de..a19ebd36b5 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -888,7 +888,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
(LPWSTR) a1p, a1len / 2);
if (!r)
ereport(ERROR,
- (errmsg("could not convert string to UTF16: %lu",
+ (errmsg("could not convert string to UTF-16: error %lu",
GetLastError())));
}
((LPWSTR) a1p)[r] = 0;
@@ -901,7 +901,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
(LPWSTR) a2p, a2len / 2);
if (!r)
ereport(ERROR,
- (errmsg("could not convert string to UTF16: %lu",
+ (errmsg("could not convert string to UTF-16: error %lu",
GetLastError())));
}
((LPWSTR) a2p)[r] = 0;
@@ -911,8 +911,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
if (result == 2147483647) /* _NLSCMPERROR; missing from mingw
* headers */
ereport(ERROR,
- (errmsg("could not compare unicode strings: %d",
- errno)));
+ (errmsg("could not compare Unicode strings: %m")));
if (a1p != a1buf)
pfree(a1p);
diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c
index 86c8eb87b3..ff871780f1 100644
--- a/src/backend/utils/mb/conv.c
+++ b/src/backend/utils/mb/conv.c
@@ -379,7 +379,7 @@ UtfToLocal(unsigned char *utf, unsigned char *iso,
{
ereport(WARNING,
(errcode(ERRCODE_UNTRANSLATABLE_CHARACTER),
- errmsg("ignoring unconvertible UTF8 character 0x%04x",
+ errmsg("ignoring unconvertible UTF-8 character 0x%04x",
iutf)));
continue;
}
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c
index b1c207d423..4c14c4d177 100644
--- a/src/backend/utils/mb/wchar.c
+++ b/src/backend/utils/mb/wchar.c
@@ -894,7 +894,7 @@ pg_verifymbstr(const char *mbstr, int len, bool noError)
return false;
ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
- errmsg("invalid UNICODE byte sequence detected near byte 0x%02x",
+ errmsg("invalid UTF-8 byte sequence detected near byte 0x%02x",
(unsigned char) *mbstr)));
}
}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 48972cf470..0c4bd12cb6 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -719,7 +719,7 @@ static struct config_bool ConfigureNamesBool[] =
{
{"autovacuum", PGC_SIGHUP, AUTOVACUUM,
- gettext_noop("Starts the auto vacuum subprocess."),
+ gettext_noop("Starts the autovacuum subprocess."),
NULL
},
&autovacuum_start_daemon,
diff --git a/src/port/copydir.c b/src/port/copydir.c
index 5d4ef1b260..155e261630 100644
--- a/src/port/copydir.c
+++ b/src/port/copydir.c
@@ -78,7 +78,7 @@ copydir(char *fromdir, char *todir, bool recurse)
if (stat(fromfile, &fst) < 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not stat \"%s\": %m", fromfile)));
+ errmsg("could not stat file \"%s\": %m", fromfile)));
if (fst.st_mode & S_IFDIR)
{