Message corrections

This commit is contained in:
Peter Eisentraut 2005-10-29 00:31:52 +00:00
parent a7335a3401
commit 07bb9f086b
16 changed files with 46 additions and 48 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.15 2005/10/15 02:49:09 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.16 2005/10/29 00:31:50 petere Exp $
* *
* NOTES * NOTES
* Each global transaction is associated with a global transaction * Each global transaction is associated with a global transaction
@ -904,7 +904,7 @@ EndPrepare(GlobalTransaction gxact)
close(fd); close(fd);
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not seek twophase state file: %m"))); errmsg("could not seek in twophase state file: %m")));
} }
/* /*

View File

@ -6,7 +6,7 @@
* Copyright (c) 2000-2005, PostgreSQL Global Development Group * Copyright (c) 2000-2005, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/varsup.c,v 1.67 2005/10/15 02:49:09 momjian Exp $ * $PostgreSQL: pgsql/src/backend/access/transam/varsup.c,v 1.68 2005/10/29 00:31:50 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -66,9 +66,9 @@ GetNewTransactionId(bool isSubXact)
TransactionIdFollowsOrEquals(xid, ShmemVariableCache->xidStopLimit)) TransactionIdFollowsOrEquals(xid, ShmemVariableCache->xidStopLimit))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), (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)), 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)))); NameStr(ShmemVariableCache->limit_datname))));
else else
ereport(WARNING, ereport(WARNING,

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.221 2005/10/22 20:27:17 tgl Exp $ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.222 2005/10/29 00:31:50 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1468,7 +1468,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
ereport(PANIC, ereport(PANIC,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not write to log file %u, segment %u " errmsg("could not write to log file %u, segment %u "
"at offset %u length %lu: %m", "at offset %u, length %lu: %m",
openLogId, openLogSeg, openLogId, openLogSeg,
openLogOff, (unsigned long) nbytes))); openLogOff, (unsigned long) nbytes)));
} }
@ -3558,7 +3558,7 @@ ReadControlFile(void)
if (ControlFile->floatFormat != FLOATFORMAT_VALUE) if (ControlFile->floatFormat != FLOATFORMAT_VALUE)
ereport(FATAL, ereport(FATAL,
(errmsg("database files are incompatible with server"), (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."))); errhint("It looks like you need to initdb.")));
if (ControlFile->blcksz != BLCKSZ) if (ControlFile->blcksz != BLCKSZ)
ereport(FATAL, ereport(FATAL,

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.134 2005/10/15 02:49:14 momjian Exp $ * $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.135 2005/10/29 00:31:50 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -186,7 +186,7 @@ ProcedureCreate(const char *procedureName,
if ((returnType == INTERNALOID || internalOutParam) && !internalInParam) if ((returnType == INTERNALOID || internalOutParam) && !internalInParam)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), (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."))); errdetail("A function returning \"internal\" must have at least one \"internal\" argument.")));
/* /*

View File

@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.140 2005/10/15 02:49:15 momjian Exp $ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.141 2005/10/29 00:31:51 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -356,13 +356,13 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck)
if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull) if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot cluster on index \"%s\" because access method\n" errmsg("cannot cluster on index \"%s\" because access method does not handle null values",
"does not handle null values",
RelationGetRelationName(OldIndex)), RelationGetRelationName(OldIndex)),
errhint("You may be able to work around this by marking column \"%s\" NOT NULL%s", recheck
NameStr(OldHeap->rd_att->attrs[colno - 1]->attname), ? 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.",
recheck ? ",\nor use ALTER TABLE ... SET WITHOUT CLUSTER to remove the cluster\n" NameStr(OldHeap->rd_att->attrs[colno - 1]->attname))
"specification from the table." : "."))); : 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) else if (colno < 0)
{ {
@ -372,8 +372,7 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck)
/* index expression, lose... */ /* index expression, lose... */
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot cluster on expressional index \"%s\" because its index access\n" errmsg("cannot cluster on expressional index \"%s\" because its index access method does not handle null values",
"method does not handle null values",
RelationGetRelationName(OldIndex)))); RelationGetRelationName(OldIndex))));
} }

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.162 2005/10/17 16:24:18 tgl Exp $ * $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.163 2005/10/29 00:31:51 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1194,7 +1194,7 @@ AddRoleMems(const char *rolename, Oid roleid,
if (grantorId != GetUserId() && !superuser()) if (grantorId != GetUserId() && !superuser())
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), (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 */ /* We need only regular writer's lock on pg_auth_members */
pg_authmem_rel = heap_open(AuthMemRelationId, RowExclusiveLock); pg_authmem_rel = heap_open(AuthMemRelationId, RowExclusiveLock);

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.49 2005/10/15 02:49:25 momjian Exp $ * $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.50 2005/10/29 00:31:51 petere Exp $
* *
* *
* NOTES: * NOTES:
@ -726,14 +726,14 @@ CheckFreeSpaceMapStatistics(int elevel, int numRels, double needed)
ereport(elevel, ereport(elevel,
(errmsg("max_fsm_relations(%d) equals the number of relations checked", (errmsg("max_fsm_relations(%d) equals the number of relations checked",
MaxFSMRelations), MaxFSMRelations),
errhint("You have >= %d relations.\n" errhint("You have at least %d relations. "
"Consider increasing the configuration parameter \"max_fsm_relations\".", "Consider increasing the configuration parameter \"max_fsm_relations\".",
numRels))); numRels)));
else if (needed > MaxFSMPages) else if (needed > MaxFSMPages)
ereport(elevel, 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), 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))); "to a value over %.0f.", needed)));
} }

View File

@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.35 2005/10/15 02:49:26 momjian Exp $ * $PostgreSQL: pgsql/src/backend/storage/lmgr/deadlock.c,v 1.36 2005/10/29 00:31:51 petere Exp $
* *
* Interface: * Interface:
* *
@ -888,7 +888,7 @@ DescribeLockTag(StringInfo buf, const LOCKTAG *lock)
break; break;
default: default:
appendStringInfo(buf, appendStringInfo(buf,
_("unknown locktag type %d"), _("unrecognized locktag type %d"),
lock->locktag_type); lock->locktag_type);
break; break;
} }

View File

@ -5,7 +5,7 @@
* Copyright (c) 2002-2005, PostgreSQL Global Development Group * Copyright (c) 2002-2005, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/dbsize.c,v 1.6 2005/10/15 02:49:28 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/dbsize.c,v 1.7 2005/10/29 00:31:51 petere Exp $
* *
*/ */
@ -53,7 +53,7 @@ db_dir_size(const char *path)
if (stat(filename, &fst) < 0) if (stat(filename, &fst) < 0)
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not stat \"%s\": %m", filename))); errmsg("could not stat file \"%s\": %m", filename)));
dirsize += fst.st_size; dirsize += fst.st_size;
} }
@ -175,7 +175,7 @@ calculate_tablespace_size(Oid tblspcOid)
if (stat(pathname, &fst) < 0) if (stat(pathname, &fst) < 0)
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (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) if (fst.st_mode & S_IFDIR)
totalsize += db_dir_size(pathname); totalsize += db_dir_size(pathname);
@ -251,7 +251,7 @@ calculate_relation_size(RelFileNode *rfn)
else else
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (errcode_for_file_access(),
errmsg("could not stat \"%s\": %m", pathname))); errmsg("could not stat file \"%s\": %m", pathname)));
} }
totalsize += fst.st_size; totalsize += fst.st_size;
} }

View File

@ -9,7 +9,7 @@
* Author: Andreas Pflug <pgadmin@pse-consulting.de> * Author: Andreas Pflug <pgadmin@pse-consulting.de>
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/genfile.c,v 1.8 2005/10/15 19:47:09 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/genfile.c,v 1.9 2005/10/29 00:31:51 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -122,7 +122,7 @@ pg_read_file(PG_FUNCTION_ARGS)
if (bytes_to_read < 0) if (bytes_to_read < 0)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), (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 */ /* not sure why anyone thought that int64 length was a good idea */
if (bytes_to_read > (MaxAllocSize - VARHDRSZ)) if (bytes_to_read > (MaxAllocSize - VARHDRSZ))

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/oracle_compat.c,v 1.62 2005/10/15 02:49:29 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/oracle_compat.c,v 1.63 2005/10/29 00:31:51 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -214,7 +214,7 @@ win32_utf8_wcstotext(const wchar_t *str)
if (nbytes == 0) /* shouldn't happen */ if (nbytes == 0) /* shouldn't happen */
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
errmsg("UTF16 to UTF8 translation failed: %lu", errmsg("UTF-16 to UTF-8 translation failed: %lu",
GetLastError()))); GetLastError())));
result = palloc(nbytes + VARHDRSZ); result = palloc(nbytes + VARHDRSZ);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.138 2005/10/18 20:38:58 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.139 2005/10/29 00:31:51 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -888,7 +888,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
(LPWSTR) a1p, a1len / 2); (LPWSTR) a1p, a1len / 2);
if (!r) if (!r)
ereport(ERROR, ereport(ERROR,
(errmsg("could not convert string to UTF16: %lu", (errmsg("could not convert string to UTF-16: error %lu",
GetLastError()))); GetLastError())));
} }
((LPWSTR) a1p)[r] = 0; ((LPWSTR) a1p)[r] = 0;
@ -901,7 +901,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
(LPWSTR) a2p, a2len / 2); (LPWSTR) a2p, a2len / 2);
if (!r) if (!r)
ereport(ERROR, ereport(ERROR,
(errmsg("could not convert string to UTF16: %lu", (errmsg("could not convert string to UTF-16: error %lu",
GetLastError()))); GetLastError())));
} }
((LPWSTR) a2p)[r] = 0; ((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 if (result == 2147483647) /* _NLSCMPERROR; missing from mingw
* headers */ * headers */
ereport(ERROR, ereport(ERROR,
(errmsg("could not compare unicode strings: %d", (errmsg("could not compare Unicode strings: %m")));
errno)));
if (a1p != a1buf) if (a1p != a1buf)
pfree(a1p); pfree(a1p);

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/mb/conv.c,v 1.55 2005/10/15 02:49:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/conv.c,v 1.56 2005/10/29 00:31:52 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -379,7 +379,7 @@ UtfToLocal(unsigned char *utf, unsigned char *iso,
{ {
ereport(WARNING, ereport(WARNING,
(errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER),
errmsg("ignoring unconvertible UTF8 character 0x%04x", errmsg("ignoring unconvertible UTF-8 character 0x%04x",
iutf))); iutf)));
continue; continue;
} }

View File

@ -1,7 +1,7 @@
/* /*
* conversion functions between pg_wchar and multibyte streams. * conversion functions between pg_wchar and multibyte streams.
* Tatsuo Ishii * Tatsuo Ishii
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.46 2005/10/15 02:49:33 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.47 2005/10/29 00:31:52 petere Exp $
* *
* WIN1250 client encoding updated by Pavel Behal * WIN1250 client encoding updated by Pavel Behal
* *
@ -894,7 +894,7 @@ pg_verifymbstr(const char *mbstr, int len, bool noError)
return false; return false;
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), (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))); (unsigned char) *mbstr)));
} }
} }

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.295 2005/10/20 20:05:45 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.296 2005/10/29 00:31:52 petere Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
@ -719,7 +719,7 @@ static struct config_bool ConfigureNamesBool[] =
{ {
{"autovacuum", PGC_SIGHUP, AUTOVACUUM, {"autovacuum", PGC_SIGHUP, AUTOVACUUM,
gettext_noop("Starts the auto vacuum subprocess."), gettext_noop("Starts the autovacuum subprocess."),
NULL NULL
}, },
&autovacuum_start_daemon, &autovacuum_start_daemon,

View File

@ -11,7 +11,7 @@
* as a service. * as a service.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.15 2005/10/15 02:49:50 momjian Exp $ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.16 2005/10/29 00:31:52 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -78,7 +78,7 @@ copydir(char *fromdir, char *todir, bool recurse)
if (stat(fromfile, &fst) < 0) if (stat(fromfile, &fst) < 0)
ereport(ERROR, ereport(ERROR,
(errcode_for_file_access(), (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) if (fst.st_mode & S_IFDIR)
{ {