1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Wording cleanup for error messages. Also change can't -> cannot.

Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
This commit is contained in:
Bruce Momjian
2007-02-01 19:10:30 +00:00
parent baaec74c5a
commit 8b4ff8b6a1
103 changed files with 274 additions and 274 deletions

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.155 2007/01/05 22:19:25 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.156 2007/02/01 19:10:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -376,9 +376,9 @@ check_index_is_clusterable(Relation OldHeap, Oid indexOid, bool recheck)
errmsg("cannot cluster on index \"%s\" because access method does not handle null values",
RelationGetRelationName(OldIndex)),
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.",
? errhint("You might 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.",
: errhint("You might be able to work around this by marking column \"%s\" NOT NULL.",
NameStr(OldHeap->rd_att->attrs[colno - 1]->attname))));
}
else if (colno < 0)

View File

@ -7,7 +7,7 @@
* Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/comment.c,v 1.95 2007/01/23 05:07:17 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/comment.c,v 1.96 2007/02/01 19:10:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -584,7 +584,7 @@ CommentDatabase(List *qualname, char *comment)
if (list_length(qualname) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("database name may not be qualified")));
errmsg("database name cannot be qualified")));
database = strVal(linitial(qualname));
/*
@ -632,7 +632,7 @@ CommentTablespace(List *qualname, char *comment)
if (list_length(qualname) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("tablespace name may not be qualified")));
errmsg("tablespace name cannot be qualified")));
tablespace = strVal(linitial(qualname));
oid = get_tablespace_oid(tablespace);
@ -669,7 +669,7 @@ CommentRole(List *qualname, char *comment)
if (list_length(qualname) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("role name may not be qualified")));
errmsg("role name cannot be qualified")));
role = strVal(linitial(qualname));
oid = get_roleid_checked(role);
@ -702,7 +702,7 @@ CommentNamespace(List *qualname, char *comment)
if (list_length(qualname) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("schema name may not be qualified")));
errmsg("schema name cannot be qualified")));
namespace = strVal(linitial(qualname));
oid = GetSysCacheOid(NAMESPACENAME,
@ -1161,7 +1161,7 @@ CommentLanguage(List *qualname, char *comment)
if (list_length(qualname) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("language name may not be qualified")));
errmsg("language name cannot be qualified")));
language = strVal(linitial(qualname));
oid = GetSysCacheOid(LANGNAME,

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.190 2007/01/17 16:25:01 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/dbcommands.c,v 1.191 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -707,7 +707,7 @@ RenameDatabase(const char *oldname, const char *newname)
if (db_id == MyDatabaseId)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("current database may not be renamed")));
errmsg("current database cannot be renamed")));
/*
* Make sure the database does not have active sessions. This is the same

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.154 2007/01/25 04:35:10 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.155 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -315,7 +315,7 @@ DefineIndex(RangeVar *heapRelation,
if (list_length(rangetable) != 1 || getrelid(1, rangetable) != relationId)
ereport(ERROR,
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
errmsg("index expressions and predicates may refer only to the table being indexed")));
errmsg("index expressions and predicates can refer only to the table being indexed")));
}
/*

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.53 2007/01/23 05:07:17 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.54 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -508,7 +508,7 @@ DefineOpClass(CreateOpClassStmt *stmt)
else if (!amstorage)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("storage type may not be different from data type for access method \"%s\"",
errmsg("storage type cannot be different from data type for access method \"%s\"",
stmt->amname)));
}
@ -932,7 +932,7 @@ AlterOpFamilyAdd(List *opfamilyname, Oid amoid, Oid opfamilyoid,
case OPCLASS_ITEM_STORAGETYPE:
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("STORAGE may not be specified in ALTER OPERATOR FAMILY")));
errmsg("STORAGE cannot be specified in ALTER OPERATOR FAMILY")));
break;
default:
elog(ERROR, "unrecognized item type: %d", item->itemtype);

View File

@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.58 2007/01/05 22:19:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.59 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -88,7 +88,7 @@ PerformCursorOpen(DeclareCursorStmt *stmt, ParamListInfo params)
if (query->into)
ereport(ERROR,
(errcode(ERRCODE_INVALID_CURSOR_DEFINITION),
errmsg("DECLARE CURSOR may not specify INTO")));
errmsg("DECLARE CURSOR cannot specify INTO")));
if (query->rowMarks != NIL)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.42 2007/01/05 22:19:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.43 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -159,7 +159,7 @@ RemoveSchema(List *names, DropBehavior behavior, bool missing_ok)
if (list_length(names) != 1)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("schema name may not be qualified")));
errmsg("schema name cannot be qualified")));
namespaceName = strVal(linitial(names));
namespaceId = GetSysCacheOid(NAMESPACENAME,

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.142 2007/01/05 22:19:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/sequence.c,v 1.143 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1121,7 +1121,7 @@ init_params(List *options, bool isInit,
snprintf(bufm, sizeof(bufm), INT64_FORMAT, new->min_value);
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("START value (%s) can't be less than MINVALUE (%s)",
errmsg("START value (%s) cannot be less than MINVALUE (%s)",
bufs, bufm)));
}
if (new->last_value > new->max_value)
@ -1133,7 +1133,7 @@ init_params(List *options, bool isInit,
snprintf(bufm, sizeof(bufm), INT64_FORMAT, new->max_value);
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("START value (%s) can't be greater than MAXVALUE (%s)",
errmsg("START value (%s) cannot be greater than MAXVALUE (%s)",
bufs, bufm)));
}

View File

@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.41 2007/01/25 04:35:10 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/tablespace.c,v 1.42 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -228,7 +228,7 @@ CreateTableSpace(CreateTableSpaceStmt *stmt)
if (strchr(location, '\''))
ereport(ERROR,
(errcode(ERRCODE_INVALID_NAME),
errmsg("tablespace location may not contain single quotes")));
errmsg("tablespace location cannot contain single quotes")));
/*
* Allowing relative paths seems risky

View File

@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.175 2007/01/05 22:19:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/user.c,v 1.176 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1007,11 +1007,11 @@ RenameRole(const char *oldname, const char *newname)
if (roleid == GetSessionUserId())
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("session user may not be renamed")));
errmsg("session user cannot be renamed")));
if (roleid == GetOuterUserId())
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("current user may not be renamed")));
errmsg("current user cannot be renamed")));
/* make sure the new name doesn't exist */
if (SearchSysCacheExists(AUTHNAME,

View File

@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.343 2007/01/05 22:19:26 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.344 2007/02/01 19:10:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -905,7 +905,7 @@ vac_truncate_clog(TransactionId frozenXID)
{
ereport(WARNING,
(errmsg("some databases have not been vacuumed in over 2 billion transactions"),
errdetail("You may have already suffered transaction-wraparound data loss.")));
errdetail("You might have already suffered transaction-wraparound data loss.")));
return;
}
@ -1407,7 +1407,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
* release write lock before commit there.)
*/
ereport(NOTICE,
(errmsg("relation \"%s\" TID %u/%u: InsertTransactionInProgress %u --- can't shrink relation",
(errmsg("relation \"%s\" TID %u/%u: InsertTransactionInProgress %u --- cannot shrink relation",
relname, blkno, offnum, HeapTupleHeaderGetXmin(tuple.t_data))));
do_shrinking = false;
break;
@ -1420,7 +1420,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
* release write lock before commit there.)
*/
ereport(NOTICE,
(errmsg("relation \"%s\" TID %u/%u: DeleteTransactionInProgress %u --- can't shrink relation",
(errmsg("relation \"%s\" TID %u/%u: DeleteTransactionInProgress %u --- cannot shrink relation",
relname, blkno, offnum, HeapTupleHeaderGetXmax(tuple.t_data))));
do_shrinking = false;
break;
@ -1900,7 +1900,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
/* Quick exit if we have no vtlinks to search in */
if (vacrelstats->vtlinks == NULL)
{
elog(DEBUG2, "parent item in update-chain not found --- can't continue repair_frag");
elog(DEBUG2, "parent item in update-chain not found --- cannot continue repair_frag");
break; /* out of walk-along-page loop */
}
@ -2040,7 +2040,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
if (vtlp == NULL)
{
/* see discussion above */
elog(DEBUG2, "parent item in update-chain not found --- can't continue repair_frag");
elog(DEBUG2, "parent item in update-chain not found --- cannot continue repair_frag");
chain_move_failed = true;
break; /* out of check-all-items loop */
}
@ -2075,7 +2075,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
HeapTupleHeaderGetXmin(tp.t_data))))
{
ReleaseBuffer(Pbuf);
elog(DEBUG2, "too old parent tuple found --- can't continue repair_frag");
elog(DEBUG2, "too old parent tuple found --- cannot continue repair_frag");
chain_move_failed = true;
break; /* out of check-all-items loop */
}