|
26 | 26 | * |
27 | 27 | * |
28 | 28 | * IDENTIFICATION |
29 | | - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.66 1999/01/2909:22:57 vadim Exp $ |
| 29 | + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.67 1999/01/2910:15:09 vadim Exp $ |
30 | 30 | * |
31 | 31 | *------------------------------------------------------------------------- |
32 | 32 | */ |
@@ -65,7 +65,7 @@ static TupleDesc InitPlan(CmdType operation, Query *parseTree, |
65 | 65 | staticvoidEndPlan(Plan*plan,EState*estate); |
66 | 66 | staticTupleTableSlot*ExecutePlan(EState*estate,Plan*plan, |
67 | 67 | CmdTypeoperation,intnumberTuples,ScanDirectiondirection, |
68 | | -void (*printfunc) ()); |
| 68 | +DestReceiver*destfunc); |
69 | 69 | staticvoidExecRetrieve(TupleTableSlot*slot, |
70 | 70 | DestReceiver*destfunc, |
71 | 71 | EState*estate); |
@@ -756,7 +756,7 @@ ExecutePlan(EState *estate, |
756 | 756 | CmdTypeoperation, |
757 | 757 | intnumberTuples, |
758 | 758 | ScanDirectiondirection, |
759 | | -void (*printfunc) ()) |
| 759 | +DestReceiver*destfunc) |
760 | 760 | { |
761 | 761 | JunkFilter*junkfilter; |
762 | 762 |
|
@@ -941,7 +941,7 @@ lmark:; |
941 | 941 | { |
942 | 942 | caseCMD_SELECT: |
943 | 943 | ExecRetrieve(slot,/* slot containing tuple */ |
944 | | -printfunc,/* print function */ |
| 944 | +destfunc,/* print function */ |
945 | 945 | estate);/* */ |
946 | 946 | result=slot; |
947 | 947 | break; |
@@ -997,7 +997,7 @@ lmark:; |
997 | 997 | */ |
998 | 998 | staticvoid |
999 | 999 | ExecRetrieve(TupleTableSlot*slot, |
1000 | | -void (*printfunc) (), |
| 1000 | +DestReceiver*destfunc, |
1001 | 1001 | EState*estate) |
1002 | 1002 | { |
1003 | 1003 | HeapTupletuple; |
@@ -1139,8 +1139,7 @@ ExecDelete(TupleTableSlot *slot, |
1139 | 1139 | { |
1140 | 1140 | RelationInfo*resultRelationInfo; |
1141 | 1141 | RelationresultRelationDesc; |
1142 | | -ItemPointerDatactid, |
1143 | | -oldtid; |
| 1142 | +ItemPointerDatactid; |
1144 | 1143 | intresult; |
1145 | 1144 |
|
1146 | 1145 | /****************** |
@@ -1180,12 +1179,11 @@ ldelete:; |
1180 | 1179 | elog(ERROR,"Can't serialize access due to concurrent update"); |
1181 | 1180 | elseif (!(ItemPointerEquals(tupleid,&ctid))) |
1182 | 1181 | { |
1183 | | -TupleTableSlot*slot=EvalPlanQual(estate, |
| 1182 | +TupleTableSlot*epqslot=EvalPlanQual(estate, |
1184 | 1183 | resultRelationInfo->ri_RangeTableIndex,&ctid); |
1185 | 1184 |
|
1186 | | -if (!TupIsNull(slot)) |
| 1185 | +if (!TupIsNull(epqslot)) |
1187 | 1186 | { |
1188 | | -tupleid=&oldtid; |
1189 | 1187 | *tupleid=ctid; |
1190 | 1188 | gotoldelete; |
1191 | 1189 | } |
@@ -1238,8 +1236,7 @@ ExecReplace(TupleTableSlot *slot, |
1238 | 1236 | HeapTupletuple; |
1239 | 1237 | RelationInfo*resultRelationInfo; |
1240 | 1238 | RelationresultRelationDesc; |
1241 | | -ItemPointerDatactid, |
1242 | | -oldtid; |
| 1239 | +ItemPointerDatactid; |
1243 | 1240 | intresult; |
1244 | 1241 | intnumIndices; |
1245 | 1242 |
|
@@ -1321,13 +1318,14 @@ lreplace:; |
1321 | 1318 | elog(ERROR,"Can't serialize access due to concurrent update"); |
1322 | 1319 | elseif (!(ItemPointerEquals(tupleid,&ctid))) |
1323 | 1320 | { |
1324 | | -TupleTableSlot*slot=EvalPlanQual(estate, |
| 1321 | +TupleTableSlot*epqslot=EvalPlanQual(estate, |
1325 | 1322 | resultRelationInfo->ri_RangeTableIndex,&ctid); |
1326 | 1323 |
|
1327 | | -if (!TupIsNull(slot)) |
| 1324 | +if (!TupIsNull(epqslot)) |
1328 | 1325 | { |
1329 | | -tupleid=&oldtid; |
1330 | 1326 | *tupleid=ctid; |
| 1327 | +tuple=ExecRemoveJunk(estate->es_junkFilter,epqslot); |
| 1328 | +slot=ExecStoreTuple(tuple,slot,InvalidBuffer, true); |
1331 | 1329 | gotolreplace; |
1332 | 1330 | } |
1333 | 1331 | } |
|