diff options
author | Marc G. Fournier <scrappy@hub.org> | 1998-12-14 05:19:16 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1998-12-14 05:19:16 +0000 |
commit | 7c3b7d27446cbe7e4d1ccf6f51caf2d38f55916c (patch) | |
tree | 77cf346913929743b747b012d14780fb369d7041 /src/backend/executor/nodeTee.c | |
parent | f722af618a5d6cedb0e083397f6efcec2e07b0c8 (diff) | |
download | postgresql-7c3b7d27446cbe7e4d1ccf6f51caf2d38f55916c.tar.gz postgresql-7c3b7d27446cbe7e4d1ccf6f51caf2d38f55916c.zip |
Initial attempt to clean up the code...
Switch sprintf() to snprintf()
Remove any/all #if 0 -or- #ifdef NOT_USED -or- #ifdef FALSE sections of
code
Diffstat (limited to 'src/backend/executor/nodeTee.c')
-rw-r--r-- | src/backend/executor/nodeTee.c | 59 |
1 files changed, 5 insertions, 54 deletions
diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c index 7b0f7f1755e..741a4f077f1 100644 --- a/src/backend/executor/nodeTee.c +++ b/src/backend/executor/nodeTee.c @@ -15,7 +15,7 @@ * ExecEndTee * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.25 1998/11/27 19:52:03 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.26 1998/12/14 05:18:51 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -47,12 +47,12 @@ bool ExecInitTee(Tee *node, EState *currentEstate, Plan *parent) { - TeeState *teeState; - Plan *outerPlan; - int len; + TeeState *teeState; + Plan *outerPlan; + int len; Relation bufferRel; TupleDesc tupType; - EState *estate; + EState *estate; /* * it is possible that the Tee has already been initialized since it @@ -144,8 +144,6 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent) tupType = ExecGetResultType(&(teeState->cstate)); len = ExecTargetListLength(((Plan *) node)->targetlist); -/* bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID_); */ - /* * create a catalogued relation even though this is a temporary * relation @@ -176,7 +174,6 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent) sprintf(teeState->tee_bufferRelname, "ttemp_%d", /* 'ttemp' for 'tee' temporary */ newoid()); -/* bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */ bufferRel = heap_open( heap_create_with_catalog(teeState->tee_bufferRelname, tupType, RELKIND_RELATION)); @@ -429,52 +426,6 @@ ExecTee(Tee *node, Plan *parent) return result; } -#ifdef NOT_USED -/* ---------------------------------------------------------------- - * ExecTeeReScan(node) - * - * Rescans the relation. - * ---------------------------------------------------------------- - */ -void -ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent) -{ - - EState *estate; - TeeState *teeState; - ScanDirection dir; - - estate = ((Plan *) node)->state; - teeState = node->teestate; - - dir = estate->es_direction; - - /* XXX doesn't handle backwards direction yet */ - - if (parent == node->leftParent) - { - if (teeState->tee_leftScanDesc) - { - heap_rescan(teeState->tee_leftScanDesc, - ScanDirectionIsBackward(dir), - NULL); - teeState->tee_leftPlace = 0; - } - } - else - { - if (teeState->tee_rightScanDesc) - { - heap_rescan(teeState->tee_leftScanDesc, - ScanDirectionIsBackward(dir), - NULL); - teeState->tee_rightPlace = 0; - } - } -} -#endif - - /* --------------------------------------------------------------------- * ExecEndTee * |