mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Error message editing in backend/optimizer, backend/rewrite.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.103 2003/06/29 23:05:04 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.104 2003/07/25 00:01:06 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -209,7 +209,9 @@ set_inherited_rel_pathlist(Query *root, RelOptInfo *rel,
|
||||
* do better?
|
||||
*/
|
||||
if (intMember(parentRTindex, root->rowMarks))
|
||||
elog(ERROR, "SELECT FOR UPDATE is not supported for inherit queries");
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("SELECT FOR UPDATE is not supported for inherit queries")));
|
||||
|
||||
/*
|
||||
* The executor will check the parent table's access permissions when
|
||||
@ -642,7 +644,7 @@ recurse_pushdown_safe(Node *setOp, Query *topquery,
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ERROR, "recurse_pushdown_safe: unexpected node %d",
|
||||
elog(ERROR, "unrecognized node type: %d",
|
||||
(int) nodeTag(setOp));
|
||||
}
|
||||
return true;
|
||||
@ -839,7 +841,7 @@ recurse_push_qual(Node *setOp, Query *topquery,
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ERROR, "recurse_push_qual: unexpected node %d",
|
||||
elog(ERROR, "unrecognized node type: %d",
|
||||
(int) nodeTag(setOp));
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.110 2003/07/14 22:35:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.111 2003/07/25 00:01:06 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1513,7 +1513,7 @@ cost_qual_eval_walker(Node *node, QualCost *total)
|
||||
else if (IsA(node, SubLink))
|
||||
{
|
||||
/* This routine should not be applied to un-planned expressions */
|
||||
elog(ERROR, "cost_qual_eval: can't handle unplanned sub-select");
|
||||
elog(ERROR, "cannot handle unplanned sub-select");
|
||||
}
|
||||
else if (IsA(node, SubPlan))
|
||||
{
|
||||
@ -1805,8 +1805,7 @@ set_joinrel_size_estimates(Query *root, RelOptInfo *rel,
|
||||
temp = inner_rel->rows;
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "set_joinrel_size_estimates: unsupported join type %d",
|
||||
(int) jointype);
|
||||
elog(ERROR, "unrecognized join type: %d", (int) jointype);
|
||||
temp = 0; /* keep compiler quiet */
|
||||
break;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.144 2003/06/15 22:51:45 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.145 2003/07/25 00:01:06 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -490,7 +490,7 @@ extract_or_indexqual_conditions(RelOptInfo *rel,
|
||||
} while (!DoneMatchingIndexKeys(classes));
|
||||
|
||||
if (FastListValue(&quals) == NIL)
|
||||
elog(ERROR, "extract_or_indexqual_conditions: no matching clause");
|
||||
elog(ERROR, "no matching OR clause");
|
||||
|
||||
return FastListValue(&quals);
|
||||
}
|
||||
@ -1245,7 +1245,7 @@ pred_test_simple_clause(Expr *predicate, Node *clause)
|
||||
if (!OidIsValid(test_op))
|
||||
{
|
||||
/* This should not fail, else pg_amop entry is missing */
|
||||
elog(ERROR, "Missing pg_amop entry for opclass %u strategy %d",
|
||||
elog(ERROR, "missing pg_amop entry for opclass %u strategy %d",
|
||||
opclass_id, test_strategy);
|
||||
}
|
||||
|
||||
@ -1281,7 +1281,7 @@ pred_test_simple_clause(Expr *predicate, Node *clause)
|
||||
if (isNull)
|
||||
{
|
||||
/* Treat a null result as false ... but it's a tad fishy ... */
|
||||
elog(DEBUG2, "pred_test_simple_clause: null test result");
|
||||
elog(DEBUG2, "null predicate test result");
|
||||
return false;
|
||||
}
|
||||
return DatumGetBool(test_result);
|
||||
@ -2055,7 +2055,8 @@ prefix_quals(Node *leftop, Oid opclass,
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ERROR, "prefix_quals: unexpected opclass %u", opclass);
|
||||
/* shouldn't get here */
|
||||
elog(ERROR, "unexpected opclass: %u", opclass);
|
||||
return NIL;
|
||||
}
|
||||
|
||||
@ -2078,7 +2079,7 @@ prefix_quals(Node *leftop, Oid opclass,
|
||||
prefix_const->constvalue));
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "prefix_quals: unexpected consttype %u",
|
||||
elog(ERROR, "unexpected const type: %u",
|
||||
prefix_const->consttype);
|
||||
return NIL;
|
||||
}
|
||||
@ -2093,7 +2094,7 @@ prefix_quals(Node *leftop, Oid opclass,
|
||||
{
|
||||
oproid = get_opclass_member(opclass, BTEqualStrategyNumber);
|
||||
if (oproid == InvalidOid)
|
||||
elog(ERROR, "prefix_quals: no operator = for opclass %u", opclass);
|
||||
elog(ERROR, "no = operator for opclass %u", opclass);
|
||||
expr = make_opclause(oproid, BOOLOID, false,
|
||||
(Expr *) leftop, (Expr *) prefix_const);
|
||||
result = makeList1(expr);
|
||||
@ -2107,7 +2108,7 @@ prefix_quals(Node *leftop, Oid opclass,
|
||||
*/
|
||||
oproid = get_opclass_member(opclass, BTGreaterEqualStrategyNumber);
|
||||
if (oproid == InvalidOid)
|
||||
elog(ERROR, "prefix_quals: no operator >= for opclass %u", opclass);
|
||||
elog(ERROR, "no >= operator for opclass %u", opclass);
|
||||
expr = make_opclause(oproid, BOOLOID, false,
|
||||
(Expr *) leftop, (Expr *) prefix_const);
|
||||
result = makeList1(expr);
|
||||
@ -2122,7 +2123,7 @@ prefix_quals(Node *leftop, Oid opclass,
|
||||
{
|
||||
oproid = get_opclass_member(opclass, BTLessStrategyNumber);
|
||||
if (oproid == InvalidOid)
|
||||
elog(ERROR, "prefix_quals: no operator < for opclass %u", opclass);
|
||||
elog(ERROR, "no < operator for opclass %u", opclass);
|
||||
expr = make_opclause(oproid, BOOLOID, false,
|
||||
(Expr *) leftop, (Expr *) greaterstr);
|
||||
result = lappend(result, expr);
|
||||
@ -2167,8 +2168,7 @@ network_prefix_quals(Node *leftop, Oid expr_op, Oid opclass, Datum rightop)
|
||||
is_eq = true;
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "network_prefix_quals: unexpected operator %u",
|
||||
expr_op);
|
||||
elog(ERROR, "unexpected operator: %u", expr_op);
|
||||
return NIL;
|
||||
}
|
||||
|
||||
@ -2180,15 +2180,13 @@ network_prefix_quals(Node *leftop, Oid expr_op, Oid opclass, Datum rightop)
|
||||
{
|
||||
opr1oid = get_opclass_member(opclass, BTGreaterEqualStrategyNumber);
|
||||
if (opr1oid == InvalidOid)
|
||||
elog(ERROR, "network_prefix_quals: no >= operator for opclass %u",
|
||||
opclass);
|
||||
elog(ERROR, "no >= operator for opclass %u", opclass);
|
||||
}
|
||||
else
|
||||
{
|
||||
opr1oid = get_opclass_member(opclass, BTGreaterStrategyNumber);
|
||||
if (opr1oid == InvalidOid)
|
||||
elog(ERROR, "network_prefix_quals: no > operator for opclass %u",
|
||||
opclass);
|
||||
elog(ERROR, "no > operator for opclass %u", opclass);
|
||||
}
|
||||
|
||||
opr1right = network_scan_first(rightop);
|
||||
@ -2203,8 +2201,7 @@ network_prefix_quals(Node *leftop, Oid expr_op, Oid opclass, Datum rightop)
|
||||
|
||||
opr2oid = get_opclass_member(opclass, BTLessEqualStrategyNumber);
|
||||
if (opr2oid == InvalidOid)
|
||||
elog(ERROR, "network_prefix_quals: no <= operator for opclass %u",
|
||||
opclass);
|
||||
elog(ERROR, "no <= operator for opclass %u", opclass);
|
||||
|
||||
opr2right = network_scan_last(rightop);
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.78 2003/02/08 20:20:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.79 2003/07/25 00:01:06 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -165,7 +165,7 @@ sort_inner_and_outer(Query *root,
|
||||
useallclauses = true;
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "sort_inner_and_outer: unexpected join type %d",
|
||||
elog(ERROR, "unrecognized join type: %d",
|
||||
(int) jointype);
|
||||
useallclauses = false; /* keep compiler quiet */
|
||||
break;
|
||||
@ -363,7 +363,7 @@ match_unsorted_outer(Query *root,
|
||||
useallclauses = true;
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "match_unsorted_outer: unexpected join type %d",
|
||||
elog(ERROR, "unrecognized join type: %d",
|
||||
(int) jointype);
|
||||
nestjoinOK = false; /* keep compiler quiet */
|
||||
useallclauses = false;
|
||||
@ -815,7 +815,9 @@ select_mergejoin_clauses(RelOptInfo *joinrel,
|
||||
case JOIN_FULL:
|
||||
if (restrictinfo->left_relids == NULL ||
|
||||
restrictinfo->mergejoinoperator == InvalidOid)
|
||||
elog(ERROR, "FULL JOIN is only supported with mergejoinable join conditions");
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("FULL JOIN is only supported with mergejoinable join conditions")));
|
||||
break;
|
||||
default:
|
||||
/* otherwise, it's OK to have nonmergeable join quals */
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.60 2003/02/08 20:20:54 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.61 2003/07/25 00:01:07 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -227,8 +227,7 @@ make_rels_by_joins(Query *root, int level, List **joinrels)
|
||||
}
|
||||
|
||||
if (result_rels == NIL)
|
||||
elog(ERROR, "make_rels_by_joins: failed to build any %d-way joins",
|
||||
level);
|
||||
elog(ERROR, "failed to build any %d-way joins", level);
|
||||
}
|
||||
|
||||
return result_rels;
|
||||
@ -367,8 +366,8 @@ make_jointree_rel(Query *root, Node *jtnode)
|
||||
/* Make this join rel */
|
||||
rel = make_join_rel(root, lrel, rrel, j->jointype);
|
||||
|
||||
if (rel == NULL)
|
||||
elog(ERROR, "make_jointree_rel: invalid join order!?");
|
||||
if (rel == NULL) /* oops */
|
||||
elog(ERROR, "invalid join order");
|
||||
|
||||
/*
|
||||
* Since we are only going to consider this one way to do it,
|
||||
@ -385,8 +384,8 @@ make_jointree_rel(Query *root, Node *jtnode)
|
||||
return rel;
|
||||
}
|
||||
else
|
||||
elog(ERROR, "make_jointree_rel: unexpected node type %d",
|
||||
nodeTag(jtnode));
|
||||
elog(ERROR, "unrecognized node type: %d",
|
||||
(int) nodeTag(jtnode));
|
||||
return NULL; /* keep compiler quiet */
|
||||
}
|
||||
|
||||
@ -571,7 +570,7 @@ make_join_rel(Query *root, RelOptInfo *rel1, RelOptInfo *rel2,
|
||||
restrictlist);
|
||||
break;
|
||||
default:
|
||||
elog(ERROR, "make_join_rel: unsupported join type %d",
|
||||
elog(ERROR, "unrecognized join type: %d",
|
||||
(int) jointype);
|
||||
break;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.50 2003/06/29 23:05:04 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.51 2003/07/25 00:01:07 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1089,7 +1089,7 @@ make_pathkeys_for_mergeclauses(Query *root,
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(ERROR, "make_pathkeys_for_mergeclauses: can't identify which side of mergeclause to use");
|
||||
elog(ERROR, "could not identify which side of mergeclause to use");
|
||||
pathkey = NIL; /* keep compiler quiet */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user