mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Message editing: remove gratuitous variations in message wording, standardize
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.287 2003/08/11 23:04:49 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.288 2003/09/25 06:58:00 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -970,7 +970,7 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
|
||||
snamespace = get_namespace_name(RangeVarGetCreationNamespace(cxt->relation));
|
||||
|
||||
ereport(NOTICE,
|
||||
(errmsg("%s will create implicit sequence \"%s\" for SERIAL column \"%s.%s\"",
|
||||
(errmsg("%s will create implicit sequence \"%s\" for \"serial\" column \"%s.%s\"",
|
||||
cxt->stmtType, sname,
|
||||
cxt->relation->relname, column->colname)));
|
||||
|
||||
@@ -1054,8 +1054,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
|
||||
if (saw_nullable && column->is_not_null)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("conflicting NULL/NOT NULL declarations for \"%s.%s\"",
|
||||
cxt->relation->relname, column->colname)));
|
||||
errmsg("conflicting NULL/NOT NULL declarations for column \"%s\" of table \"%s\"",
|
||||
column->colname, cxt->relation->relname)));
|
||||
column->is_not_null = FALSE;
|
||||
saw_nullable = true;
|
||||
break;
|
||||
@@ -1064,8 +1064,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
|
||||
if (saw_nullable && !column->is_not_null)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("conflicting NULL/NOT NULL declarations for \"%s.%s\"",
|
||||
cxt->relation->relname, column->colname)));
|
||||
errmsg("conflicting NULL/NOT NULL declarations for column \"%s\" of table \"%s\"",
|
||||
column->colname, cxt->relation->relname)));
|
||||
column->is_not_null = TRUE;
|
||||
saw_nullable = true;
|
||||
break;
|
||||
@@ -1074,8 +1074,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
|
||||
if (column->raw_default != NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("multiple DEFAULT values specified for \"%s.%s\"",
|
||||
cxt->relation->relname, column->colname)));
|
||||
errmsg("multiple default values specified for column \"%s\" of table \"%s\"",
|
||||
column->colname, cxt->relation->relname)));
|
||||
column->raw_default = constraint->raw_expr;
|
||||
Assert(constraint->cooked_expr == NULL);
|
||||
break;
|
||||
@@ -1390,7 +1390,7 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
|
||||
if (rel->rd_rel->relkind != RELKIND_RELATION)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("inherited table \"%s\" is not a relation",
|
||||
errmsg("inherited relation \"%s\" is not a table",
|
||||
inh->relname)));
|
||||
for (count = 0; count < rel->rd_att->natts; count++)
|
||||
{
|
||||
@@ -1447,12 +1447,18 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt)
|
||||
{
|
||||
iparam = (IndexElem *) lfirst(columns);
|
||||
if (iparam->name && strcmp(key, iparam->name) == 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||
/* translator: second %s is PRIMARY KEY or UNIQUE */
|
||||
errmsg("column \"%s\" appears twice in %s constraint",
|
||||
key,
|
||||
index->primary ? "PRIMARY KEY" : "UNIQUE")));
|
||||
{
|
||||
if (index->primary)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||
errmsg("column \"%s\" appears twice in primary key constraint",
|
||||
key)));
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||
errmsg("column \"%s\" appears twice in unique constraint",
|
||||
key)));
|
||||
}
|
||||
}
|
||||
|
||||
/* OK, add it to the index definition */
|
||||
@@ -1560,8 +1566,8 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt,
|
||||
return;
|
||||
|
||||
ereport(NOTICE,
|
||||
(errmsg("%s will create implicit trigger(s) for FOREIGN KEY check(s)",
|
||||
cxt->stmtType)));
|
||||
(errmsg("%s will create implicit triggers for foreign-key checks",
|
||||
cxt->stmtType)));
|
||||
|
||||
/*
|
||||
* For ALTER TABLE ADD CONSTRAINT, nothing to do. For CREATE TABLE or
|
||||
@@ -2764,11 +2770,11 @@ transformExecuteStmt(ParseState *pstate, ExecuteStmt *stmt)
|
||||
if (pstate->p_hasSubLinks)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot use sub-select in EXECUTE parameter")));
|
||||
errmsg("cannot use subquery in EXECUTE parameter")));
|
||||
if (pstate->p_hasAggs)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_GROUPING_ERROR),
|
||||
errmsg("cannot use aggregate in EXECUTE parameter")));
|
||||
errmsg("cannot use aggregate function in EXECUTE parameter")));
|
||||
|
||||
given_type_id = exprType(expr);
|
||||
expected_type_id = lfirsto(paramtypes);
|
||||
@@ -2816,7 +2822,7 @@ CheckSelectForUpdate(Query *qry)
|
||||
if (qry->hasAggs)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("SELECT FOR UPDATE is not allowed with AGGREGATE")));
|
||||
errmsg("SELECT FOR UPDATE is not allowed with aggregate functions")));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2999,7 +3005,7 @@ transformConstraintAttrs(List *constraintList)
|
||||
((FkConstraint *) lastprimarynode)->initdeferred)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("INITIALLY DEFERRED constraint must be DEFERRABLE")));
|
||||
errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE")));
|
||||
break;
|
||||
case CONSTR_ATTR_DEFERRED:
|
||||
if (lastprimarynode == NULL ||
|
||||
@@ -3223,7 +3229,7 @@ check_parameter_resolution_walker(Node *node,
|
||||
if (param->paramtype != context->paramTypes[paramno - 1])
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_AMBIGUOUS_PARAMETER),
|
||||
errmsg("could not determine datatype of parameter $%d",
|
||||
errmsg("could not determine data type of parameter $%d",
|
||||
paramno)));
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.433 2003/09/15 22:28:57 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.434 2003/09/25 06:58:00 petere Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -1767,7 +1767,7 @@ key_match: MATCH FULL
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("FOREIGN KEY/MATCH PARTIAL is not yet implemented")));
|
||||
errmsg("MATCH PARTIAL not yet implemented")));
|
||||
$$ = FKCONSTR_MATCH_PARTIAL;
|
||||
}
|
||||
| MATCH SIMPLE
|
||||
@@ -4762,7 +4762,7 @@ table_ref: relation_expr
|
||||
*/
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select in FROM must have an alias"),
|
||||
errmsg("subquery in FROM must have an alias"),
|
||||
errhint("For example, FROM (SELECT ...) [AS] foo.")));
|
||||
$$ = NULL;
|
||||
}
|
||||
@@ -5190,7 +5190,7 @@ opt_float: '(' Iconst ')'
|
||||
if ($2 < 1)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("precision for FLOAT must be at least 1 bit")));
|
||||
errmsg("precision for type float must be at least 1 bit")));
|
||||
else if ($2 <= 24)
|
||||
$$ = SystemTypeName("float4");
|
||||
else if ($2 <= 53)
|
||||
@@ -5198,7 +5198,7 @@ opt_float: '(' Iconst ')'
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("precision for FLOAT must be less than 54 bits")));
|
||||
errmsg("precision for type float must be less than 54 bits")));
|
||||
}
|
||||
| /*EMPTY*/
|
||||
{
|
||||
@@ -7632,7 +7632,7 @@ SpecialRuleRelation:
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("OLD used in non-rule query")));
|
||||
errmsg("OLD used in query that is not in a rule")));
|
||||
}
|
||||
| NEW
|
||||
{
|
||||
@@ -7641,7 +7641,7 @@ SpecialRuleRelation:
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("NEW used in non-rule query")));
|
||||
errmsg("NEW used in query that is not in a rule")));
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.57 2003/08/04 02:40:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.58 2003/09/25 06:58:00 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -302,12 +302,12 @@ check_ungrouped_columns_walker(Node *node,
|
||||
if (context->sublevels_up == 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_GROUPING_ERROR),
|
||||
errmsg("attribute \"%s.%s\" must be GROUPed or used in an aggregate function",
|
||||
errmsg("column \"%s.%s\" must appear in GROUP BY clause or used in an aggregate function",
|
||||
rte->eref->aliasname, attname)));
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_GROUPING_ERROR),
|
||||
errmsg("sub-select uses un-GROUPed attribute \"%s.%s\" from outer query",
|
||||
errmsg("subquery uses ungrouped column \"%s.%s\" from outer query",
|
||||
rte->eref->aliasname, attname)));
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.122 2003/08/17 19:58:05 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.123 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -393,7 +393,7 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r)
|
||||
if (r->alias == NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select in FROM must have an alias")));
|
||||
errmsg("subquery in FROM must have an alias")));
|
||||
|
||||
/*
|
||||
* Analyze and transform the subquery.
|
||||
@@ -406,17 +406,17 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r)
|
||||
* check 'em anyway.
|
||||
*/
|
||||
if (length(parsetrees) != 1)
|
||||
elog(ERROR, "unexpected parse analysis result for sub-select in FROM");
|
||||
elog(ERROR, "unexpected parse analysis result for subquery in FROM");
|
||||
query = (Query *) lfirst(parsetrees);
|
||||
if (query == NULL || !IsA(query, Query))
|
||||
elog(ERROR, "unexpected parse analysis result for sub-select in FROM");
|
||||
elog(ERROR, "unexpected parse analysis result for subquery in FROM");
|
||||
|
||||
if (query->commandType != CMD_SELECT)
|
||||
elog(ERROR, "expected SELECT query from sub-select in FROM");
|
||||
elog(ERROR, "expected SELECT query from subquery in FROM");
|
||||
if (query->resultRelation != 0 || query->into != NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select in FROM may not have SELECT INTO")));
|
||||
errmsg("subquery in FROM may not have SELECT INTO")));
|
||||
|
||||
/*
|
||||
* The subquery cannot make use of any variables from FROM items
|
||||
@@ -438,7 +438,7 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r)
|
||||
if (contain_vars_of_level((Node *) query, 1))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
|
||||
errmsg("sub-select in FROM may not refer to other relations of same query level")));
|
||||
errmsg("subquery in FROM may not refer to other relations of same query level")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -725,7 +725,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels)
|
||||
if (strcmp(res_colname, u_colname) == 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||
errmsg("USING column name \"%s\" appears more than once",
|
||||
errmsg("column name \"%s\" appears more than once in USING clause",
|
||||
u_colname)));
|
||||
}
|
||||
|
||||
@@ -749,7 +749,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels)
|
||||
if (l_index < 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("JOIN/USING column \"%s\" not found in left table",
|
||||
errmsg("column \"%s\" specified in USING clause not found in left table",
|
||||
u_colname)));
|
||||
|
||||
/* Find it in right input */
|
||||
@@ -772,7 +772,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels)
|
||||
if (r_index < 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("JOIN/USING column \"%s\" not found in right table",
|
||||
errmsg("column \"%s\" specified in USING clause not found in right table",
|
||||
u_colname)));
|
||||
|
||||
l_colvar = nth(l_index, l_colvars);
|
||||
@@ -1033,7 +1033,7 @@ transformLimitClause(ParseState *pstate, Node *clause,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
/* translator: %s is name of a SQL construct, eg LIMIT */
|
||||
errmsg("argument of %s must not contain sub-selects",
|
||||
errmsg("argument of %s must not contain subqueries",
|
||||
constructName)));
|
||||
}
|
||||
|
||||
@@ -1134,11 +1134,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
|
||||
if (!equal(target_result->expr, tle->expr))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_AMBIGUOUS_COLUMN),
|
||||
|
||||
/*
|
||||
* translator: first %s is name of a SQL
|
||||
* construct, eg ORDER BY
|
||||
*/
|
||||
/* translator: first %s is name of a SQL construct, eg ORDER BY */
|
||||
errmsg("%s \"%s\" is ambiguous",
|
||||
clauseText[clause], name)));
|
||||
}
|
||||
@@ -1178,7 +1174,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
|
||||
/* translator: %s is name of a SQL construct, eg ORDER BY */
|
||||
errmsg("%s position %d is not in target list",
|
||||
errmsg("%s position %d is not in select list",
|
||||
clauseText[clause], target_pos)));
|
||||
}
|
||||
|
||||
@@ -1363,7 +1359,7 @@ transformDistinctClause(ParseState *pstate, List *distinctlist,
|
||||
if (tle->resdom->resjunk)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
|
||||
errmsg("for SELECT DISTINCT, ORDER BY expressions must appear in target list")));
|
||||
errmsg("for SELECT DISTINCT, ORDER BY expressions must appear in select list")));
|
||||
else
|
||||
result = lappend(result, copyObject(scl));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.109 2003/09/23 17:12:53 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.110 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -914,7 +914,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
if (OidIsValid(elem_typeid) && actual_type != elem_typeid)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("arguments declared ANYELEMENT are not all alike"),
|
||||
errmsg("arguments declared \"anyelement\" are not all alike"),
|
||||
errdetail("%s versus %s",
|
||||
format_type_be(elem_typeid),
|
||||
format_type_be(actual_type))));
|
||||
@@ -931,7 +931,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
if (OidIsValid(array_typeid) && actual_type != array_typeid)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("arguments declared ANYARRAY are not all alike"),
|
||||
errmsg("arguments declared \"anyarray\" are not all alike"),
|
||||
errdetail("%s versus %s",
|
||||
format_type_be(array_typeid),
|
||||
format_type_be(actual_type))));
|
||||
@@ -960,7 +960,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
if (!OidIsValid(array_typelem))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("argument declared ANYARRAY is not an array but %s",
|
||||
errmsg("argument declared \"anyarray\" is not an array but %s",
|
||||
format_type_be(array_typeid))));
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
/* otherwise, they better match */
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("argument declared ANYARRAY is not consistent with argument declared ANYELEMENT"),
|
||||
errmsg("argument declared \"anyarray\" is not consistent with argument declared \"anyelement\""),
|
||||
errdetail("%s versus %s",
|
||||
format_type_be(array_typeid),
|
||||
format_type_be(elem_typeid))));
|
||||
@@ -988,7 +988,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
/* Only way to get here is if all the generic args are UNKNOWN */
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("could not determine ANYARRAY/ANYELEMENT type because input is UNKNOWN")));
|
||||
errmsg("could not determine anyarray/anyelement type because input has type \"unknown\"")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1013,7 +1013,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
if (!OidIsValid(array_typeid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(elem_typeid))));
|
||||
}
|
||||
declared_arg_types[j] = array_typeid;
|
||||
@@ -1030,7 +1030,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types,
|
||||
if (!OidIsValid(array_typeid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(elem_typeid))));
|
||||
}
|
||||
return array_typeid;
|
||||
@@ -1072,7 +1072,7 @@ resolve_generic_type(Oid declared_type,
|
||||
if (!OidIsValid(array_typelem))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("argument declared ANYARRAY is not an array but %s",
|
||||
errmsg("argument declared \"anyarray\" is not an array but type %s",
|
||||
format_type_be(context_actual_type))));
|
||||
return context_actual_type;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ resolve_generic_type(Oid declared_type,
|
||||
if (!OidIsValid(array_typeid))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(context_actual_type))));
|
||||
return array_typeid;
|
||||
}
|
||||
@@ -1099,7 +1099,7 @@ resolve_generic_type(Oid declared_type,
|
||||
if (!OidIsValid(array_typelem))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DATATYPE_MISMATCH),
|
||||
errmsg("argument declared ANYARRAY is not an array but %s",
|
||||
errmsg("argument declared \"anyarray\" is not an array but type %s",
|
||||
format_type_be(context_actual_type))));
|
||||
return array_typelem;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.161 2003/08/17 23:43:26 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.162 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -103,8 +103,9 @@ transformExpr(ParseState *pstate, Node *expr)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_STATEMENT_TOO_COMPLEX),
|
||||
errmsg("expression too complex"),
|
||||
errdetail("Nesting depth exceeds MAX_EXPR_DEPTH = %d.",
|
||||
max_expr_depth)));
|
||||
errdetail("Nesting depth exceeds maximum expression depth %d.",
|
||||
max_expr_depth),
|
||||
errhint("Increase the configuration parameter \"max_expr_depth\".")));
|
||||
|
||||
switch (nodeTag(expr))
|
||||
{
|
||||
@@ -493,13 +494,13 @@ transformExpr(ParseState *pstate, Node *expr)
|
||||
((TargetEntry *) lfirst(tlist))->resdom->resjunk)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select must return a column")));
|
||||
errmsg("subquery must return a column")));
|
||||
while ((tlist = lnext(tlist)) != NIL)
|
||||
{
|
||||
if (!((TargetEntry *) lfirst(tlist))->resdom->resjunk)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select must return only one column")));
|
||||
errmsg("subquery must return only one column")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -582,7 +583,7 @@ transformExpr(ParseState *pstate, Node *expr)
|
||||
if (left_list == NIL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select has too many columns")));
|
||||
errmsg("subquery has too many columns")));
|
||||
lexpr = lfirst(left_list);
|
||||
left_list = lnext(left_list);
|
||||
|
||||
@@ -620,7 +621,7 @@ transformExpr(ParseState *pstate, Node *expr)
|
||||
if (left_list != NIL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("sub-select has too few columns")));
|
||||
errmsg("subquery has too few columns")));
|
||||
|
||||
if (needNot)
|
||||
{
|
||||
@@ -792,7 +793,7 @@ transformExpr(ParseState *pstate, Node *expr)
|
||||
if (!OidIsValid(element_type))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(array_type))));
|
||||
}
|
||||
|
||||
@@ -1030,7 +1031,7 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref)
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" not found", name)));
|
||||
errmsg("column \"%s\" does not exist", name)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1224,7 +1225,7 @@ exprType(Node *expr)
|
||||
if (!OidIsValid(type))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(tent->resdom->restype))));
|
||||
}
|
||||
}
|
||||
@@ -1263,7 +1264,7 @@ exprType(Node *expr)
|
||||
if (!OidIsValid(type))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find array type for datatype %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(tent->resdom->restype))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.159 2003/08/04 02:40:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.160 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot pass result of sub-select or join %s to a function",
|
||||
errmsg("cannot pass result of subquery or join %s to a function",
|
||||
relname)));
|
||||
toid = InvalidOid; /* keep compiler quiet */
|
||||
break;
|
||||
@@ -298,7 +298,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" not found in datatype %s",
|
||||
errmsg("attribute \"%s\" not found in data type %s",
|
||||
colname, format_type_be(relTypeId))));
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
||||
func_signature_string(funcname, nargs,
|
||||
actual_arg_types)),
|
||||
errhint("Could not choose a best candidate function. "
|
||||
"You may need to add explicit typecasts.")));
|
||||
"You may need to add explicit type casts.")));
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_FUNCTION),
|
||||
@@ -320,7 +320,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
||||
func_signature_string(funcname, nargs,
|
||||
actual_arg_types)),
|
||||
errhint("No function matches the given name and argument types. "
|
||||
"You may need to add explicit typecasts.")));
|
||||
"You may need to add explicit type casts.")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1267,7 +1267,7 @@ setup_field_select(Node *input, char *attname, Oid relid)
|
||||
if (attno == InvalidAttrNumber)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" of relation \"%s\" does not exist",
|
||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||
attname, get_rel_name(relid))));
|
||||
|
||||
fselect->arg = (Expr *) input;
|
||||
@@ -1341,7 +1341,7 @@ ParseComplexProjection(char *funcname, Node *first_arg)
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple helper routine for delivering "no such attribute" error message
|
||||
* Simple helper routine for delivering "column does not exist" error message
|
||||
*/
|
||||
static void
|
||||
unknown_attribute(const char *schemaname, const char *relname,
|
||||
@@ -1350,12 +1350,12 @@ unknown_attribute(const char *schemaname, const char *relname,
|
||||
if (schemaname)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("no such attribute %s.%s.%s",
|
||||
errmsg("column %s.%s.%s does not exist",
|
||||
schemaname, relname, attname)));
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("no such attribute %s.%s",
|
||||
errmsg("column %s.%s does not exist",
|
||||
relname, attname)));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.74 2003/08/17 19:58:05 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.75 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -754,14 +754,14 @@ op_error(List *op, char oprkind, Oid arg1, Oid arg2, FuncDetailCode fdresult)
|
||||
errmsg("operator is not unique: %s",
|
||||
op_signature_string(op, oprkind, arg1, arg2)),
|
||||
errhint("Could not choose a best candidate operator. "
|
||||
"You may need to add explicit typecasts.")));
|
||||
"You may need to add explicit type casts.")));
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_FUNCTION),
|
||||
errmsg("operator does not exist: %s",
|
||||
op_signature_string(op, oprkind, arg1, arg2)),
|
||||
errhint("No operator matches the given name and argument type(s). "
|
||||
"You may need to add explicit typecasts.")));
|
||||
"You may need to add explicit type casts.")));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -893,7 +893,7 @@ make_scalar_array_op(ParseState *pstate, List *opname,
|
||||
if (!OidIsValid(res_atypeId))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("could not find datatype for array of %s",
|
||||
errmsg("could not find array type for data type %s",
|
||||
format_type_be(declared_arg_types[1]))));
|
||||
actual_arg_types[1] = atypeId;
|
||||
declared_arg_types[1] = res_atypeId;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.89 2003/08/11 23:04:49 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.90 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -932,7 +932,7 @@ addRangeTableEntryForFunction(ParseState *pstate,
|
||||
if (funcrettype != RECORDOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("a column definition list is only allowed for functions returning RECORD")));
|
||||
errmsg("a column definition list is only allowed for functions returning \"record\"")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -943,7 +943,7 @@ addRangeTableEntryForFunction(ParseState *pstate,
|
||||
if (funcrettype == RECORDOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("a column definition list is required for functions returning RECORD")));
|
||||
errmsg("a column definition list is required for functions returning \"record\"")));
|
||||
}
|
||||
|
||||
functyptype = get_typtype(funcrettype);
|
||||
@@ -1580,7 +1580,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum,
|
||||
if (att_tup->attisdropped)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" of relation \"%s\" does not exist",
|
||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||
NameStr(att_tup->attname),
|
||||
get_rel_name(rte->relid))));
|
||||
*vartype = att_tup->atttypid;
|
||||
@@ -1638,7 +1638,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum,
|
||||
if (att_tup->attisdropped)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" of relation \"%s\" does not exist",
|
||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||
NameStr(att_tup->attname),
|
||||
get_rel_name(funcrelid))));
|
||||
*vartype = att_tup->atttypid;
|
||||
@@ -1817,7 +1817,7 @@ attnameAttNum(Relation rd, const char *attname, bool sysColOK)
|
||||
/* on failure */
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" of relation \"%s\" does not exist",
|
||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||
attname, RelationGetRelationName(rd))));
|
||||
return InvalidAttrNumber; /* keep compiler quiet */
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.112 2003/08/11 23:04:49 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.113 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ transformTargetEntry(ParseState *pstate,
|
||||
if (IsA(expr, RangeVar))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("relation reference \"%s\" cannot be used as a targetlist entry",
|
||||
errmsg("relation reference \"%s\" cannot be used as a select-list entry",
|
||||
((RangeVar *) expr)->relname),
|
||||
errhint("Write \"%s\".* to denote all the columns of the relation.",
|
||||
((RangeVar *) expr)->relname)));
|
||||
@@ -328,7 +328,7 @@ updateTargetListEntry(ParseState *pstate,
|
||||
if (attrno <= 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot assign to system attribute \"%s\"",
|
||||
errmsg("cannot assign to system column \"%s\"",
|
||||
colname)));
|
||||
attrtype = attnumTypeId(rd, attrno);
|
||||
attrtypmod = rd->rd_att->attrs[attrno - 1]->atttypmod;
|
||||
@@ -497,7 +497,7 @@ checkInsertTargets(ParseState *pstate, List *cols, List **attrnos)
|
||||
if (intMember(attrno, *attrnos))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||
errmsg("attribute \"%s\" specified more than once",
|
||||
errmsg("column \"%s\" specified more than once",
|
||||
name)));
|
||||
*attrnos = lappendi(*attrnos, attrno);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.61 2003/08/04 02:40:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.62 2003/09/25 06:58:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -91,7 +91,7 @@ LookupTypeName(const TypeName *typename)
|
||||
if (attnum == InvalidAttrNumber)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("attribute \"%s\" of relation \"%s\" does not exist",
|
||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||
field, rel->relname)));
|
||||
restype = get_atttype(relid, attnum);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user