mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
Change elog(WARN) to elog(ERROR) and elog(ABORT).
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.20 1997/12/18 12:54:04 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.21 1998/01/05 03:31:59 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -185,7 +185,7 @@ create_scan_node(Path *best_path, List *tlist)
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(WARN, "create_scan_node: unknown node type",
|
||||
elog(ABORT, "create_scan_node: unknown node type",
|
||||
best_path->pathtype);
|
||||
break;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ create_join_node(JoinPath *best_path, List *tlist)
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
elog(WARN, "create_join_node: unknown node type",
|
||||
elog(ABORT, "create_join_node: unknown node type",
|
||||
best_path->path.pathtype);
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ create_seqscan_node(Path *best_path, List *tlist, List *scan_clauses)
|
||||
|
||||
temp = best_path->parent->relids;
|
||||
if (temp == NULL)
|
||||
elog(WARN, "scanrelid is empty");
|
||||
elog(ABORT, "scanrelid is empty");
|
||||
else
|
||||
scan_relid = (Index) lfirsti(temp); /* ??? who takes care of
|
||||
* lnext? - ay */
|
||||
@@ -364,7 +364,7 @@ create_indexscan_node(IndexPath *best_path,
|
||||
ObjectIdGetDatum(lfirsti(ixid)),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(indexTuple))
|
||||
elog(WARN, "create_plan: index %d not found",
|
||||
elog(ABORT, "create_plan: index %d not found",
|
||||
lfirsti(ixid));
|
||||
index = (IndexTupleForm) GETSTRUCT(indexTuple);
|
||||
if (index->indislossy)
|
||||
@@ -915,7 +915,7 @@ make_temp(List *tlist,
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(WARN, "make_temp: unknown temp type %d", temptype);
|
||||
elog(ABORT, "make_temp: unknown temp type %d", temptype);
|
||||
|
||||
}
|
||||
return (retval);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.13 1997/12/22 05:42:04 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.14 1998/01/05 03:32:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -407,7 +407,7 @@ make_groupPlan(List **tlist,
|
||||
|
||||
if (length(glc) != 0)
|
||||
{
|
||||
elog(WARN, "group attribute disappeared from target list");
|
||||
elog(ABORT, "group attribute disappeared from target list");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.18 1997/12/29 01:12:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.19 1998/01/05 03:32:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -279,7 +279,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
if (rettype == InvalidOid)
|
||||
return;
|
||||
else
|
||||
elog(WARN, "return type mismatch in function decl: final query is a catalog utility");
|
||||
elog(ABORT, "return type mismatch in function decl: final query is a catalog utility");
|
||||
}
|
||||
|
||||
/* okay, it's an ordinary query */
|
||||
@@ -294,7 +294,7 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
if (rettype == InvalidOid)
|
||||
{
|
||||
if (cmd == CMD_SELECT)
|
||||
elog(WARN,
|
||||
elog(ABORT,
|
||||
"function declared with no return type, but final query is a retrieve");
|
||||
else
|
||||
return;
|
||||
@@ -302,14 +302,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
|
||||
/* by here, the function is declared to return some type */
|
||||
if ((typ = typeidType(rettype)) == NULL)
|
||||
elog(WARN, "can't find return type %d for function\n", rettype);
|
||||
elog(ABORT, "can't find return type %d for function\n", rettype);
|
||||
|
||||
/*
|
||||
* test 3: if the function is declared to return a value, then the
|
||||
* final query had better be a retrieve.
|
||||
*/
|
||||
if (cmd != CMD_SELECT)
|
||||
elog(WARN, "function declared to return type %s, but final query is not a retrieve", typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return type %s, but final query is not a retrieve", typeTypeName(typ));
|
||||
|
||||
/*
|
||||
* test 4: for base type returns, the target list should have exactly
|
||||
@@ -319,11 +319,11 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
if (typeTypeRelid(typ) == InvalidOid)
|
||||
{
|
||||
if (exec_tlist_length(tlist) > 1)
|
||||
elog(WARN, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return %s returns multiple values in final retrieve", typeTypeName(typ));
|
||||
|
||||
resnode = (Resdom *) ((TargetEntry *) lfirst(tlist))->resdom;
|
||||
if (resnode->restype != rettype)
|
||||
elog(WARN, "return type mismatch in function: declared to return %s, returns %s", typeTypeName(typ), typeidTypeName(resnode->restype));
|
||||
elog(ABORT, "return type mismatch in function: declared to return %s, returns %s", typeTypeName(typ), typeidTypeName(resnode->restype));
|
||||
|
||||
/* by here, base return types match */
|
||||
return;
|
||||
@@ -352,13 +352,13 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
reln = heap_open(typeTypeRelid(typ));
|
||||
|
||||
if (!RelationIsValid(reln))
|
||||
elog(WARN, "cannot open relation relid %d", typeTypeRelid(typ));
|
||||
elog(ABORT, "cannot open relation relid %d", typeTypeRelid(typ));
|
||||
|
||||
relid = reln->rd_id;
|
||||
relnatts = reln->rd_rel->relnatts;
|
||||
|
||||
if (exec_tlist_length(tlist) != relnatts)
|
||||
elog(WARN, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return type %s does not retrieve (%s.*)", typeTypeName(typ), typeTypeName(typ));
|
||||
|
||||
/* expect attributes 1 .. n in order */
|
||||
for (i = 1; i <= relnatts; i++)
|
||||
@@ -388,14 +388,14 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
|
||||
else if (IsA(thenode, Func))
|
||||
tletype = (Oid) get_functype((Func *) thenode);
|
||||
else
|
||||
elog(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
}
|
||||
else
|
||||
elog(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
#endif
|
||||
/* reach right in there, why don't you? */
|
||||
if (tletype != reln->rd_att->attrs[i - 1]->atttypid)
|
||||
elog(WARN, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
elog(ABORT, "function declared to return type %s does not retrieve (%s.all)", typeTypeName(typ), typeTypeName(typ));
|
||||
}
|
||||
|
||||
heap_close(reln);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.10 1997/12/22 05:42:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.11 1998/01/05 03:32:05 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -201,7 +201,7 @@ set_temp_tlist_references(Temp *temp)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(WARN, "calling set_temp_tlist_references with empty lefttree");
|
||||
elog(ABORT, "calling set_temp_tlist_references with empty lefttree");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -651,7 +651,7 @@ replace_result_clause(List *clause,
|
||||
/*
|
||||
* Ooops! we can not handle that!
|
||||
*/
|
||||
elog(WARN, "replace_result_clause: Can not handle this tlist!\n");
|
||||
elog(ABORT, "replace_result_clause: Can not handle this tlist!\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
|
||||
/*
|
||||
* Ooops! we can not handle that!
|
||||
*/
|
||||
elog(WARN, "replace_agg_clause: Can not handle this tlist!\n");
|
||||
elog(ABORT, "replace_agg_clause: Can not handle this tlist!\n");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -902,7 +902,7 @@ del_agg_clause(Node *clause)
|
||||
/*
|
||||
* Ooops! we can not handle that!
|
||||
*/
|
||||
elog(WARN, "del_agg_clause: Can not handle this tlist!\n");
|
||||
elog(ABORT, "del_agg_clause: Can not handle this tlist!\n");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user