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

Goodbye ABORT. Hello ERROR for all errors.

This commit is contained in:
Bruce Momjian
1998-01-07 21:07:04 +00:00
parent e6c6146eb8
commit 679d39b9c8
99 changed files with 493 additions and 497 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.7 1998/01/05 03:31:54 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.8 1998/01/07 21:03:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -133,7 +133,7 @@ xfunc_predmig(JoinPath pathnode,/* root of the join tree */
/* sanity check */
if ((!streamroot && laststream) ||
(streamroot && !laststream))
elog(ABORT, "called xfunc_predmig with bad inputs");
elog(ERROR, "called xfunc_predmig with bad inputs");
if (streamroot)
Assert(xfunc_check_stream(streamroot));
@ -333,7 +333,7 @@ xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
orignode = (Stream) get_downstream(orignode))
/* empty body in for loop */ ;
if (!orignode)
elog(ABORT, "Didn't find matching node in original stream");
elog(ERROR, "Didn't find matching node in original stream");
/* pull up this node as far as it should go */
@ -790,14 +790,14 @@ xfunc_check_stream(Stream node)
{
if ((Stream) get_upstream((Stream) get_downstream(temp)) != temp)
{
elog(ABORT, "bad pointers in stream");
elog(ERROR, "bad pointers in stream");
return (false);
}
if (!is_clause(temp))
{
if ((tmp = xfunc_num_relids(temp)) >= numrelids)
{
elog(ABORT, "Joins got reordered!");
elog(ERROR, "Joins got reordered!");
return (false);
}
numrelids = tmp;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.10 1998/01/06 18:52:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.11 1998/01/07 21:03:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -130,7 +130,7 @@ prune_rel_paths(List *rel_list)
rel->size = compute_joinrel_size(cheapest);
}
else
elog(ABORT, "non JoinPath called");
elog(ERROR, "non JoinPath called");
}
}

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.10 1998/01/05 03:31:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.11 1998/01/07 21:03:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -461,7 +461,7 @@ xfunc_local_expense(LispValue clause)
}
else
{
elog(ABORT, "Clause node of undetermined type");
elog(ERROR, "Clause node of undetermined type");
return (-1);
}
}
@ -497,7 +497,7 @@ xfunc_func_expense(LispValue node, LispValue args)
{
/* don't trust the opid in the Oper node. Use the opno. */
if (!(funcid = get_opcode(get_opno((Oper) node))))
elog(ABORT, "Oper's function is undefined");
elog(ERROR, "Oper's function is undefined");
}
else
{
@ -507,7 +507,7 @@ xfunc_func_expense(LispValue node, LispValue args)
/* look up tuple in cache */
tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d", funcid);
elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl);
/*
@ -622,7 +622,7 @@ xfunc_width(LispValue clause)
PointerGetDatum(get_vartype((Var) clause)),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for type %d",
elog(ERROR, "Cache lookup failed for type %d",
get_vartype((Var) clause));
type = (TypeTupleForm) GETSTRUCT(tupl);
if (get_varattno((Var) clause) == 0)
@ -686,7 +686,7 @@ xfunc_width(LispValue clause)
ObjectIdGetDatum(get_opno((Oper) get_op(clause))),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d",
elog(ERROR, "Cache lookup failed for procedure %d",
get_opno((Oper) get_op(clause)));
return (xfunc_func_width
((RegProcedure) (((OperatorTupleForm) (GETSTRUCT(tupl)))->oprcode),
@ -717,7 +717,7 @@ xfunc_width(LispValue clause)
}
else
{
elog(ABORT, "Clause node of undetermined type");
elog(ERROR, "Clause node of undetermined type");
return (-1);
}
@ -855,7 +855,7 @@ xfunc_find_references(LispValue clause)
}
else
{
elog(ABORT, "Clause node of undetermined type");
elog(ERROR, "Clause node of undetermined type");
return ((List) LispNil);
}
}
@ -1192,7 +1192,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
xfunc_fixvars(lfirst(tmpclause), rel, varno);
else
{
elog(ABORT, "Clause node of undetermined type");
elog(ERROR, "Clause node of undetermined type");
}
}
@ -1320,7 +1320,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
Assert(RegProcedureIsValid(funcid));
tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for procedure %d", funcid);
elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl);
/* if function returns a tuple, get the width of that */
@ -1338,7 +1338,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
ObjectIdGetDatum(proc->prorettype),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ABORT, "Cache lookup failed for type %d", proc->prorettype);
elog(ERROR, "Cache lookup failed for type %d", proc->prorettype);
type = (TypeTupleForm) GETSTRUCT(tupl);
/* if the type length is known, return that */
if (type->typlen != -1)
@ -1421,7 +1421,7 @@ xfunc_LispRemove(LispValue foo, List bar)
sanity = true; /* found a matching item to remove! */
if (!sanity)
elog(ABORT, "xfunc_LispRemove: didn't find a match!");
elog(ERROR, "xfunc_LispRemove: didn't find a match!");
return (result);
}