summaryrefslogtreecommitdiff
path: root/src/backend/parser/analyze.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-02-01 19:10:30 +0000
committerBruce Momjian <bruce@momjian.us>2007-02-01 19:10:30 +0000
commit8b4ff8b6a14096a28910fbff3d485f30dcb9a637 (patch)
treec250f17f4a8e3bfee442970a0666431ed8310650 /src/backend/parser/analyze.c
parentbaaec74c5a953032049015883802660edd821cac (diff)
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".
Diffstat (limited to 'src/backend/parser/analyze.c')
-rw-r--r--src/backend/parser/analyze.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 4117fbb6da5..0eb81d6d898 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -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/parser/analyze.c,v 1.359 2007/01/12 19:34:41 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.360 2007/02/01 19:10:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -646,7 +646,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt,
if (selectQuery->into)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("INSERT ... SELECT may not specify INTO")));
+ errmsg("INSERT ... SELECT cannot specify INTO")));
/*
* Make the source be a subquery in the INSERT's rangetable, and add
@@ -1803,7 +1803,7 @@ transformIndexStmt(ParseState *pstate, IndexStmt *stmt)
if (expression_returns_set(ielem->expr))
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
- errmsg("index expression may not return a set")));
+ errmsg("index expression cannot return a set")));
}
}
@@ -1892,7 +1892,7 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
if (list_length(pstate->p_rtable) != 2) /* naughty, naughty... */
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("rule WHERE condition may not contain references to other relations")));
+ errmsg("rule WHERE condition cannot contain references to other relations")));
/* aggregates not allowed (but subselects are okay) */
if (pstate->p_hasAggs)
@@ -1967,7 +1967,7 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
stmt->whereClause != NULL)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("rules with WHERE conditions may only have SELECT, INSERT, UPDATE, or DELETE actions")));
+ errmsg("rules with WHERE conditions can only have SELECT, INSERT, UPDATE, or DELETE actions")));
/*
* If the action is INSERT...SELECT, OLD/NEW have been pushed down
@@ -2003,11 +2003,11 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
if (has_old)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("ON SELECT rule may not use OLD")));
+ errmsg("ON SELECT rule cannot use OLD")));
if (has_new)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("ON SELECT rule may not use NEW")));
+ errmsg("ON SELECT rule cannot use NEW")));
break;
case CMD_UPDATE:
/* both are OK */
@@ -2016,13 +2016,13 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
if (has_old)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("ON INSERT rule may not use OLD")));
+ errmsg("ON INSERT rule cannot use OLD")));
break;
case CMD_DELETE:
if (has_new)
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("ON DELETE rule may not use NEW")));
+ errmsg("ON DELETE rule cannot use NEW")));
break;
default:
elog(ERROR, "unrecognized event type: %d",
@@ -2663,7 +2663,7 @@ transformSetOperationTree(ParseState *pstate, SelectStmt *stmt)
if (contain_vars_of_level((Node *) selectQuery, 1))
ereport(ERROR,
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
- errmsg("UNION/INTERSECT/EXCEPT member statement may not refer to other relations of same query level")));
+ errmsg("UNION/INTERSECT/EXCEPT member statement cannot refer to other relations of same query level")));
}
/*
@@ -2987,7 +2987,7 @@ transformReturningList(ParseState *pstate, List *returningList)
if (list_length(pstate->p_rtable) != length_rtable)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("RETURNING may not contain references to other relations")));
+ errmsg("RETURNING cannot contain references to other relations")));
/* mark column origins */
markTargetListOrigins(pstate, rlist);
@@ -3206,7 +3206,7 @@ transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt)
if (((Query *) stmt->query)->into)
ereport(ERROR,
(errcode(ERRCODE_INVALID_CURSOR_DEFINITION),
- errmsg("DECLARE CURSOR may not specify INTO")));
+ errmsg("DECLARE CURSOR cannot specify INTO")));
return result;
}