1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Remove un-needed braces around single statements.

This commit is contained in:
Bruce Momjian
1998-06-15 19:30:31 +00:00
parent 27db9ecd0b
commit 6bd323c6b3
224 changed files with 221 additions and 2504 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.20 1998/02/27 16:11:26 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.21 1998/06/15 19:28:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -124,9 +124,7 @@ ExecOpenR(Oid relationOid, bool isindex)
* ----------------
*/
if (isindex)
{
relation = index_open(relationOid);
}
else
relation = heap_open(relationOid);

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.10 1998/01/31 04:38:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.11 1998/06/15 19:28:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -230,9 +230,7 @@ ExecInitJunkFilter(List *targetList)
}
}
else
{
cleanMap = NULL;
}
/* ---------------------
* Finally create and initialize the JunkFilter.

View File

@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.47 1998/05/26 03:44:07 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.48 1998/06/15 19:28:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -364,9 +364,7 @@ ExecCheckPerms(CmdType operation,
++i;
}
if (!ok)
{
elog(ERROR, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]);
}
}
/* ===============================================================
@ -660,9 +658,7 @@ EndPlan(Plan *plan, EState *estate)
* ----------------
*/
if (intoRelationDesc != NULL)
{
heap_close(intoRelationDesc);
}
}
/* ----------------------------------------------------------------
@ -1009,9 +1005,7 @@ ExecAppend(TupleTableSlot *slot,
*/
numIndices = resultRelationInfo->ri_NumIndices;
if (numIndices > 0)
{
ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, false);
}
(estate->es_processed)++;
estate->es_lastoid = newId;
@ -1218,9 +1212,7 @@ ExecReplace(TupleTableSlot *slot,
numIndices = resultRelationInfo->ri_NumIndices;
if (numIndices > 0)
{
ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, true);
}
/* AFTER ROW UPDATE Triggers */
if (resultRelationDesc->trigdesc &&

View File

@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.10 1998/05/19 18:05:45 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.11 1998/06/15 19:28:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -426,13 +426,9 @@ ExecEndNode(Plan *node, Plan *parent)
return;
foreach(subp, node->initPlan)
{
ExecEndSubPlan((SubPlan *) lfirst(subp));
}
foreach(subp, node->subPlan)
{
ExecEndSubPlan((SubPlan *) lfirst(subp));
}
if (node->chgParam != NULL)
{
freeList(node->chgParam);

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.32 1998/05/29 17:00:06 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.33 1998/06/15 19:28:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -417,16 +417,12 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
case PARAM_NAMED:
if (thisParameterKind == paramList->kind &&
strcmp(paramList->name, thisParameterName) == 0)
{
matchFound = 1;
}
break;
case PARAM_NUM:
if (thisParameterKind == paramList->kind &&
paramList->id == thisParameterId)
{
matchFound = 1;
}
break;
case PARAM_OLD:
case PARAM_NEW:
@ -454,9 +450,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
thisParameterKind);
}
if (!matchFound)
{
paramList++;
}
} /* while */
} /* if */
@ -821,9 +815,7 @@ ExecMakeFunctionResult(Node *node,
* its func cache.
*/
if (*isDone)
{
((Func *) node)->func_fcache = NULL;
}
}
return result;
}
@ -1558,9 +1550,7 @@ ExecTargetList(List *targetlist,
#endif
resind = fjRes->resno - 1;
if (fjIsNull[curNode])
{
null_head[resind] = 'n';
}
else
{
null_head[resind] = ' ';

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.31 1998/04/27 04:05:41 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.32 1998/06/15 19:28:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -804,9 +804,7 @@ ExecOpenIndices(Oid resultRelationOid,
pfree(predString);
}
else
{
predicate = NULL;
}
/* ----------------
* save the index information into lists
@ -916,9 +914,7 @@ ExecOpenIndices(Oid resultRelationOid,
i = 0;
foreach(indexpreds, predList)
{
indexInfoArray[i++]->ii_Predicate = lfirst(indexpreds);
}
/* ----------------
* store the index info array into relation info
* ----------------
@ -1117,9 +1113,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
if (predicate != NULL)
{
if (econtext == NULL)
{
econtext = makeNode(ExprContext);
}
econtext->ecxt_scantuple = slot;
/* Skip this index-update if the predicate isn't satisfied */

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.16 1998/02/13 03:26:44 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.17 1998/06/15 19:28:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -176,9 +176,7 @@ postquel_start(execution_state *es)
* 30-8-1996
*/
if (es->qd->operation == CMD_UTILITY)
{
return (TupleDesc) NULL;
}
#endif
return ExecutorStart(es->qd, es->estate);
}
@ -218,9 +216,7 @@ postquel_end(execution_state *es)
* 30-8-1996
*/
if (es->qd->operation == CMD_UTILITY)
{
return;
}
#endif
ExecutorEnd(es->qd, es->estate);
}

View File

@ -405,9 +405,7 @@ ExecAgg(Agg *node)
* the tuples we aggregate over share the same group column)
*/
if (!oneTuple)
{
oneTuple = heap_copytuple(outerslot->val);
}
nTuplesAgged++;
}
@ -437,13 +435,9 @@ ExecAgg(Agg *node)
args[1] = (char *) value2[i];
}
else if (aggfns->xfn1.fn_addr != NULL)
{
args[0] = (char *) value1[i];
}
else if (aggfns->xfn2.fn_addr != NULL)
{
args[0] = (char *) value2[i];
}
else
elog(NOTICE, "ExecAgg: no valid transition functions??");
value1[i] = (Datum) fmgr_c(&aggfns->finalfn,
@ -458,9 +452,7 @@ ExecAgg(Agg *node)
*/
}
else if (aggfns->xfn2.fn_addr != NULL)
{
value1[i] = value2[i];
}
else
elog(ERROR, "ExecAgg: no valid transition functions??");
}
@ -475,9 +467,7 @@ ExecAgg(Agg *node)
aggstate->agg_done = ((Group *) outerPlan)->grpstate->grp_done;
}
else
{
aggstate->agg_done = TRUE;
}
/* ----------------
* form a projection tuple, store it in the result tuple

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.11 1998/02/26 04:31:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.12 1998/06/15 19:28:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -351,9 +351,7 @@ ExecCountSlotsAppend(Append *node)
int nSlots = 0;
foreach(plan, unionplans)
{
nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
}
return nSlots + APPEND_NSLOTS;
}
@ -426,13 +424,9 @@ ExecProcAppend(Append *node)
whichplan = unionstate->as_whichplan;
if (ScanDirectionIsForward(direction))
{
unionstate->as_whichplan = whichplan + 1;
}
else
{
unionstate->as_whichplan = whichplan - 1;
}
/* ----------------
* return something from next node or an empty slot
@ -484,9 +478,7 @@ ExecEndAppend(Append *node)
for (i = 0; i < nplans; i++)
{
if (initialized[i] == TRUE)
{
ExecEndNode((Plan *) nth(i, unionplans), (Plan *) node);
}
}
/* ----------------

View File

@ -13,7 +13,7 @@
* columns. (ie. tuples from the same group are consecutive)
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.18 1998/02/26 04:31:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.19 1998/06/15 19:28:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -114,9 +114,7 @@ ExecGroupEveryTuple(Group *node)
firsttuple = grpstate->grp_firstTuple;
/* this should occur on the first call only */
if (firsttuple == NULL)
{
grpstate->grp_firstTuple = heap_copytuple(outerTuple);
}
else
{

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.20 1998/02/26 04:31:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.21 1998/06/15 19:28:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -354,9 +354,7 @@ ExecHashTableCreate(Hash *node)
shmid = 0;
if (hashtable == NULL)
{
elog(ERROR, "not enough memory for hashjoin.");
}
/* ----------------
* initialize the hash table header
* ----------------

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.17 1998/03/30 16:46:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.18 1998/06/15 19:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -279,13 +279,9 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
ExecEvalExpr(scanexpr, exprCtxt, &isNull, &isDone);
scan_keys[j].sk_argument = scanvalue;
if (isNull)
{
scan_keys[j].sk_flags |= SK_ISNULL;
}
else
{
scan_keys[j].sk_flags &= ~SK_ISNULL;
}
}
}
}
@ -885,9 +881,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* ----------------
*/
if (have_runtime_keys)
{
indexstate->iss_RuntimeKeyInfo = (Pointer) runtimeKeyInfo;
}
else
{
indexstate->iss_RuntimeKeyInfo = NULL;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.15 1998/06/15 18:39:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.16 1998/06/15 19:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -571,13 +571,9 @@ ExecMergeJoin(MergeJoin *node)
MJ_DEBUG_QUAL(mergeclauses, qualResult);
if (qualResult)
{
mergestate->mj_JoinState = EXEC_MJ_JOINTUPLES;
}
else
{
mergestate->mj_JoinState = EXEC_MJ_NEXTOUTER;
}
break;
/*
@ -634,13 +630,9 @@ ExecMergeJoin(MergeJoin *node)
econtext->ecxt_innertuple = innerTupleSlot;
if (TupIsNull(innerTupleSlot))
{
mergestate->mj_JoinState = EXEC_MJ_NEXTOUTER;
}
else
{
mergestate->mj_JoinState = EXEC_MJ_JOINTEST;
}
break;
/*
@ -863,13 +855,9 @@ ExecMergeJoin(MergeJoin *node)
MJ_DEBUG_MERGE_COMPARE(innerSkipQual, compareResult);
if (compareResult)
{
mergestate->mj_JoinState = EXEC_MJ_SKIPINNER;
}
else
{
mergestate->mj_JoinState = EXEC_MJ_JOINMARK;
}
break;
/*
@ -986,13 +974,9 @@ ExecMergeJoin(MergeJoin *node)
MJ_DEBUG_MERGE_COMPARE(outerSkipQual, compareResult);
if (compareResult)
{
mergestate->mj_JoinState = EXEC_MJ_SKIPOUTER;
}
else
{
mergestate->mj_JoinState = EXEC_MJ_JOINMARK;
}
break;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.9 1998/02/26 04:31:31 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.10 1998/06/15 19:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -120,9 +120,7 @@ ExecNestLoop(NestLoop *node, Plan *parent)
needNewOuterTuple = false;
if (!TupIsNull(outerTupleSlot))
{
ENL1_printf("have outer tuple, deal with it");
}
else
{
ENL1_printf("outer tuple is nil, need new outer tuple");
@ -196,9 +194,7 @@ ExecNestLoop(NestLoop *node, Plan *parent)
econtext->ecxt_innertuple = innerTupleSlot;
if (TupIsNull(innerTupleSlot))
{
ENL1_printf("couldn't get inner tuple - need new outer tuple");
}
else
{
ENL1_printf("got inner and outer tuples");

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.9 1998/03/30 16:46:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.10 1998/06/15 19:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -129,13 +129,9 @@ ExecSeqScan(SeqScan *node)
* ----------------
*/
if ((outerPlan = outerPlan((Plan *) node)) != NULL)
{
slot = ExecProcNode(outerPlan, (Plan *) node);
}
else
{
slot = ExecScan(node, SeqNext);
}
S1_printf("ExecSeqScan: returned tuple slot: %d\n", slot);

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.14 1998/02/26 04:31:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.15 1998/06/15 19:28:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -181,9 +181,7 @@ ExecSort(Sort *node)
SO1_printf(stderr, "ExecSort: sorting done.\n");
}
else
{
slot = (TupleTableSlot *) sortstate->csstate.cstate.cs_ResultTupleSlot;
}
SO1_printf("ExecSort: %s\n",
"retrieving tuple from sorted relation");

View File

@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.17 1998/04/24 14:41:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.18 1998/06/15 19:28:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -315,18 +315,14 @@ ExecTee(Tee *node, Plan *parent)
/* XXX doesn't handle backwards direction yet */
if (parent == node->leftParent)
{
branch = leftPlace;
}
else if ((parent == node->rightParent) || (parent == (Plan *) node))
/*
* the tee node could be the root node of the plan, in which case,
* we treat it like a right-parent pull
*/
{
branch = rightPlace;
}
else
{
elog(ERROR, "A Tee node can only be executed from its left or right parent\n");
@ -419,13 +415,9 @@ ExecTee(Tee *node, Plan *parent)
}
if (parent == node->leftParent)
{
teeState->tee_leftPlace = leftPlace + 1;
}
else
{
teeState->tee_rightPlace = rightPlace + 1;
}
return result;
}