mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +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/executor/execAmi.c,v 1.12 1997/11/28 04:40:03 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.13 1998/01/05 03:31:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -313,7 +313,7 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(WARN, "ExecReScan: not a seqscan or indexscan node.");
|
||||
elog(ABORT, "ExecReScan: not a seqscan or indexscan node.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.35 1997/11/28 17:27:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.36 1998/01/05 03:31:06 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -328,7 +328,7 @@ ExecCheckPerms(CmdType operation,
|
||||
ObjectIdGetDatum(relid),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htp))
|
||||
elog(WARN, "ExecCheckPerms: bogus RT relid: %d",
|
||||
elog(ABORT, "ExecCheckPerms: bogus RT relid: %d",
|
||||
relid);
|
||||
StrNCpy(rname.data,
|
||||
((Form_pg_class) GETSTRUCT(htp))->relname.data,
|
||||
@ -361,7 +361,7 @@ ExecCheckPerms(CmdType operation,
|
||||
opstr = "write";
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "ExecCheckPerms: bogus operation %d",
|
||||
elog(ABORT, "ExecCheckPerms: bogus operation %d",
|
||||
operation);
|
||||
}
|
||||
}
|
||||
@ -377,7 +377,7 @@ ExecCheckPerms(CmdType operation,
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
elog(WARN, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]);
|
||||
elog(ABORT, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
|
||||
resultRelationDesc = heap_open(resultRelationOid);
|
||||
|
||||
if (resultRelationDesc->rd_rel->relkind == RELKIND_SEQUENCE)
|
||||
elog(WARN, "You can't change sequence relation %s",
|
||||
elog(ABORT, "You can't change sequence relation %s",
|
||||
resultRelationDesc->rd_rel->relname.data);
|
||||
|
||||
/*
|
||||
@ -778,10 +778,10 @@ ExecutePlan(EState *estate,
|
||||
"ctid",
|
||||
&datum,
|
||||
&isNull))
|
||||
elog(WARN, "ExecutePlan: NO (junk) `ctid' was found!");
|
||||
elog(ABORT, "ExecutePlan: NO (junk) `ctid' was found!");
|
||||
|
||||
if (isNull)
|
||||
elog(WARN, "ExecutePlan: (junk) `ctid' is NULL!");
|
||||
elog(ABORT, "ExecutePlan: (junk) `ctid' is NULL!");
|
||||
|
||||
tupleid = (ItemPointer) DatumGetPointer(datum);
|
||||
tuple_ctid = *tupleid; /* make sure we don't free the
|
||||
@ -1376,7 +1376,7 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
|
||||
for (attrChk = 1; attrChk <= rel->rd_att->natts; attrChk++)
|
||||
{
|
||||
if (rel->rd_att->attrs[attrChk - 1]->attnotnull && heap_attisnull(tuple, attrChk))
|
||||
elog(WARN, "%s: Fail to add null value in not null attribute %s",
|
||||
elog(ABORT, "%s: Fail to add null value in not null attribute %s",
|
||||
caller, rel->rd_att->attrs[attrChk - 1]->attname.data);
|
||||
}
|
||||
}
|
||||
@ -1386,7 +1386,7 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple)
|
||||
char *failed;
|
||||
|
||||
if ((failed = ExecRelCheck(rel, tuple)) != NULL)
|
||||
elog(WARN, "%s: rejected due to CHECK constraint %s", caller, failed);
|
||||
elog(ABORT, "%s: rejected due to CHECK constraint %s", caller, failed);
|
||||
}
|
||||
|
||||
return (newtuple);
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.5 1997/09/08 21:42:59 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.6 1998/01/05 03:31:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -368,7 +368,7 @@ ExecCountSlotsNode(Plan *node)
|
||||
return ExecCountSlotsTee((Tee *) node);
|
||||
|
||||
default:
|
||||
elog(WARN, "ExecCountSlotsNode: node not yet supported: %d",
|
||||
elog(ABORT, "ExecCountSlotsNode: node not yet supported: %d",
|
||||
nodeTag(node));
|
||||
break;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.20 1997/11/26 03:54:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.21 1998/01/05 03:31:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -148,7 +148,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
|
||||
return (Datum) NULL;
|
||||
}
|
||||
if (i != j)
|
||||
elog(WARN,
|
||||
elog(ABORT,
|
||||
"ExecEvalArrayRef: upper and lower indices mismatch");
|
||||
lIndex = lower.indx;
|
||||
}
|
||||
@ -429,7 +429,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
|
||||
*/
|
||||
if (strcmp(paramList->name, thisParameterName) != 0)
|
||||
{
|
||||
elog(WARN,
|
||||
elog(ABORT,
|
||||
"ExecEvalParam: new/old params with same id & diff names");
|
||||
}
|
||||
}
|
||||
@ -439,7 +439,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
|
||||
/*
|
||||
* oops! this is not supposed to happen!
|
||||
*/
|
||||
elog(WARN, "ExecEvalParam: invalid paramkind %d",
|
||||
elog(ABORT, "ExecEvalParam: invalid paramkind %d",
|
||||
thisParameterKind);
|
||||
}
|
||||
if (!matchFound)
|
||||
@ -456,7 +456,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
|
||||
* ooops! we couldn't find this parameter in the parameter list.
|
||||
* Signal an error
|
||||
*/
|
||||
elog(WARN, "ExecEvalParam: Unknown value for parameter %s",
|
||||
elog(ABORT, "ExecEvalParam: Unknown value for parameter %s",
|
||||
thisParameterName);
|
||||
}
|
||||
|
||||
@ -510,13 +510,13 @@ GetAttributeByNum(TupleTableSlot *slot,
|
||||
Datum retval;
|
||||
|
||||
if (!AttributeNumberIsValid(attrno))
|
||||
elog(WARN, "GetAttributeByNum: Invalid attribute number");
|
||||
elog(ABORT, "GetAttributeByNum: Invalid attribute number");
|
||||
|
||||
if (!AttrNumberIsForUserDefinedAttr(attrno))
|
||||
elog(WARN, "GetAttributeByNum: cannot access system attributes here");
|
||||
elog(ABORT, "GetAttributeByNum: cannot access system attributes here");
|
||||
|
||||
if (isNull == (bool *) NULL)
|
||||
elog(WARN, "GetAttributeByNum: a NULL isNull flag was passed");
|
||||
elog(ABORT, "GetAttributeByNum: a NULL isNull flag was passed");
|
||||
|
||||
if (TupIsNull(slot))
|
||||
{
|
||||
@ -557,10 +557,10 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
|
||||
int i;
|
||||
|
||||
if (attname == NULL)
|
||||
elog(WARN, "GetAttributeByName: Invalid attribute name");
|
||||
elog(ABORT, "GetAttributeByName: Invalid attribute name");
|
||||
|
||||
if (isNull == (bool *) NULL)
|
||||
elog(WARN, "GetAttributeByName: a NULL isNull flag was passed");
|
||||
elog(ABORT, "GetAttributeByName: a NULL isNull flag was passed");
|
||||
|
||||
if (TupIsNull(slot))
|
||||
{
|
||||
@ -584,7 +584,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
|
||||
}
|
||||
|
||||
if (attrno == InvalidAttrNumber)
|
||||
elog(WARN, "GetAttributeByName: attribute %s not found", attname);
|
||||
elog(ABORT, "GetAttributeByName: attribute %s not found", attname);
|
||||
|
||||
retval = heap_getattr(slot->val,
|
||||
slot->ttc_buffer,
|
||||
@ -696,7 +696,7 @@ ExecMakeFunctionResult(Node *node,
|
||||
bool argDone;
|
||||
|
||||
if (fcache->nargs > MAXFMGRARGS)
|
||||
elog(WARN, "ExecMakeFunctionResult: too many arguments");
|
||||
elog(ABORT, "ExecMakeFunctionResult: too many arguments");
|
||||
|
||||
/*
|
||||
* If the setArg in the fcache is set we have an argument
|
||||
@ -1232,13 +1232,13 @@ ExecEvalExpr(Node *expression,
|
||||
retDatum = (Datum) ExecEvalNot(expr, econtext, isNull);
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "ExecEvalExpr: unknown expression type");
|
||||
elog(ABORT, "ExecEvalExpr: unknown expression type");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
elog(WARN, "ExecEvalExpr: unknown expression type");
|
||||
elog(ABORT, "ExecEvalExpr: unknown expression type");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.13 1997/12/18 12:53:42 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.14 1998/01/05 03:31:12 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -315,7 +315,7 @@ ExecAllocTableSlot(TupleTable table)
|
||||
* table->size = newsize;
|
||||
*/
|
||||
elog(NOTICE, "Plan requires more slots than are available");
|
||||
elog(WARN, "send mail to your local executor guru to fix this");
|
||||
elog(ABORT, "send mail to your local executor guru to fix this");
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
@ -859,7 +859,7 @@ NodeGetResultTupleSlot(Plan *node)
|
||||
* should never get here
|
||||
* ----------------
|
||||
*/
|
||||
elog(WARN, "NodeGetResultTupleSlot: node not yet supported: %d ",
|
||||
elog(ABORT, "NodeGetResultTupleSlot: node not yet supported: %d ",
|
||||
nodeTag(node));
|
||||
|
||||
return NULL;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.21 1997/11/20 23:21:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.22 1998/01/05 03:31:13 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -499,7 +499,7 @@ ExecSetTypeInfo(int index,
|
||||
*/
|
||||
att = typeInfo[index];
|
||||
if (att == NULL)
|
||||
elog(WARN, "ExecSetTypeInfo: trying to assign through NULL");
|
||||
elog(ABORT, "ExecSetTypeInfo: trying to assign through NULL");
|
||||
|
||||
/* ----------------
|
||||
* assign values to the tuple descriptor, being careful not
|
||||
@ -1219,7 +1219,7 @@ setVarAttrLenForCreateTable(TupleDesc tupType, List *targetList,
|
||||
heap_close(rd);
|
||||
}
|
||||
else
|
||||
elog(WARN, "setVarAttrLenForCreateTable: can't get length for variable-length field");
|
||||
elog(ABORT, "setVarAttrLenForCreateTable: can't get length for variable-length field");
|
||||
}
|
||||
tl = lnext(tl);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ ExecAgg(Agg *node)
|
||||
ObjectIdGetDatum(agg->basetype),
|
||||
0, 0);
|
||||
if (!HeapTupleIsValid(aggTuple))
|
||||
elog(WARN, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)",
|
||||
elog(ABORT, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)",
|
||||
aggname,
|
||||
typeidTypeName(agg->basetype));
|
||||
aggp = (Form_pg_aggregate) GETSTRUCT(aggTuple);
|
||||
@ -204,7 +204,7 @@ ExecAgg(Agg *node)
|
||||
* ------------------------------------------
|
||||
*/
|
||||
if (isNull2)
|
||||
elog(WARN, "ExecAgg: agginitval2 is null");
|
||||
elog(ABORT, "ExecAgg: agginitval2 is null");
|
||||
}
|
||||
|
||||
if (OidIsValid(xfn1_oid))
|
||||
@ -305,7 +305,7 @@ ExecAgg(Agg *node)
|
||||
&isNull, &isDone);
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "ExecAgg: Bad Agg->Target for Agg %d", i);
|
||||
elog(ABORT, "ExecAgg: Bad Agg->Target for Agg %d", i);
|
||||
}
|
||||
|
||||
if (isNull && !aggregates[i]->usenulls)
|
||||
@ -355,7 +355,7 @@ ExecAgg(Agg *node)
|
||||
|
||||
break;
|
||||
default:
|
||||
elog(WARN, "ExecAgg: Bad Agg->Target for Agg %d", i);
|
||||
elog(ABORT, "ExecAgg: Bad Agg->Target for Agg %d", i);
|
||||
}
|
||||
if (attlen == -1)
|
||||
{
|
||||
@ -443,7 +443,7 @@ ExecAgg(Agg *node)
|
||||
args[0] = (char *) value2[i];
|
||||
}
|
||||
else
|
||||
elog(WARN, "ExecAgg: no valid transition functions??");
|
||||
elog(ABORT, "ExecAgg: no valid transition functions??");
|
||||
value1[i] =
|
||||
(Datum) fmgr_c(aggfns->finalfn, aggfns->finalfn_oid,
|
||||
aggfns->finalfn_nargs, (FmgrValues *) args,
|
||||
@ -462,7 +462,7 @@ ExecAgg(Agg *node)
|
||||
value1[i] = value2[i];
|
||||
}
|
||||
else
|
||||
elog(WARN, "ExecAgg: no valid transition functions??");
|
||||
elog(ABORT, "ExecAgg: no valid transition functions??");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.13 1997/09/08 21:43:11 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.14 1998/01/05 03:31:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -90,7 +90,7 @@ ExecHash(Hash *node)
|
||||
|
||||
hashtable = node->hashtable;
|
||||
if (hashtable == NULL)
|
||||
elog(WARN, "ExecHash: hash table is NULL.");
|
||||
elog(ABORT, "ExecHash: hash table is NULL.");
|
||||
|
||||
nbatch = hashtable->nbatch;
|
||||
|
||||
@ -359,7 +359,7 @@ ExecHashTableCreate(Hash *node)
|
||||
|
||||
if (hashtable == NULL)
|
||||
{
|
||||
elog(WARN, "not enough memory for hashjoin.");
|
||||
elog(ABORT, "not enough memory for hashjoin.");
|
||||
}
|
||||
/* ----------------
|
||||
* initialize the hash table header
|
||||
@ -635,7 +635,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
|
||||
if (hashtable == NULL)
|
||||
{
|
||||
perror("repalloc");
|
||||
elog(WARN, "can't expand hashtable.");
|
||||
elog(ABORT, "can't expand hashtable.");
|
||||
}
|
||||
#else
|
||||
/* ------------------
|
||||
@ -644,7 +644,7 @@ ExecHashOverflowInsert(HashJoinTable hashtable,
|
||||
* - Chris Dunlop, <chris@onthe.net.au>
|
||||
* ------------------
|
||||
*/
|
||||
elog(WARN, "hash table out of memory. Use -B parameter to increase buffers.");
|
||||
elog(ABORT, "hash table out of memory. Use -B parameter to increase buffers.");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.11 1997/11/20 23:21:28 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.12 1998/01/05 03:31:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -641,7 +641,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
|
||||
|
||||
op = (Oper *) clause->oper;
|
||||
if (!IsA(op, Oper))
|
||||
elog(WARN, "ExecInitIndexScan: op not an Oper!");
|
||||
elog(ABORT, "ExecInitIndexScan: op not an Oper!");
|
||||
|
||||
opid = op->opid;
|
||||
|
||||
@ -757,7 +757,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
|
||||
* ----------------
|
||||
*/
|
||||
if (scanvar == LEFT_OP)
|
||||
elog(WARN, "ExecInitIndexScan: %s",
|
||||
elog(ABORT, "ExecInitIndexScan: %s",
|
||||
"both left and right op's are rel-vars");
|
||||
|
||||
/* ----------------
|
||||
@ -810,7 +810,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
|
||||
* ----------------
|
||||
*/
|
||||
if (scanvar == LEFT_OP)
|
||||
elog(WARN, "ExecInitIndexScan: %s",
|
||||
elog(ABORT, "ExecInitIndexScan: %s",
|
||||
"both left and right ops are rel-vars");
|
||||
|
||||
varattno = 1;
|
||||
@ -836,7 +836,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
|
||||
* ----------------
|
||||
*/
|
||||
if (scanvar == NO_OP)
|
||||
elog(WARN, "ExecInitIndexScan: %s",
|
||||
elog(ABORT, "ExecInitIndexScan: %s",
|
||||
"neither leftop nor rightop refer to scan relation");
|
||||
|
||||
/* ----------------
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.10 1997/09/15 14:27:37 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.11 1998/01/05 03:31:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -56,7 +56,7 @@ FormSortKeys(Sort *sortnode)
|
||||
* ----------------
|
||||
*/
|
||||
if (keycount <= 0)
|
||||
elog(WARN, "FormSortKeys: keycount <= 0");
|
||||
elog(ABORT, "FormSortKeys: keycount <= 0");
|
||||
sortkeys = (ScanKey) palloc(keycount * sizeof(ScanKeyData));
|
||||
|
||||
/* ----------------
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ExecEndTee
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.13 1997/11/28 17:27:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.14 1998/01/05 03:31:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -329,7 +329,7 @@ ExecTee(Tee *node, Plan *parent)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(WARN, "A Tee node can only be executed from its left or right parent\n");
|
||||
elog(ABORT, "A Tee node can only be executed from its left or right parent\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user