mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Trying to fix bad merging...
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.66 1999/01/29 09:22:57 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.67 1999/01/29 10:15:09 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -65,7 +65,7 @@ static TupleDesc InitPlan(CmdType operation, Query *parseTree,
|
|||||||
static void EndPlan(Plan *plan, EState *estate);
|
static void EndPlan(Plan *plan, EState *estate);
|
||||||
static TupleTableSlot *ExecutePlan(EState *estate, Plan *plan,
|
static TupleTableSlot *ExecutePlan(EState *estate, Plan *plan,
|
||||||
CmdType operation, int numberTuples, ScanDirection direction,
|
CmdType operation, int numberTuples, ScanDirection direction,
|
||||||
void (*printfunc) ());
|
DestReceiver *destfunc);
|
||||||
static void ExecRetrieve(TupleTableSlot *slot,
|
static void ExecRetrieve(TupleTableSlot *slot,
|
||||||
DestReceiver *destfunc,
|
DestReceiver *destfunc,
|
||||||
EState *estate);
|
EState *estate);
|
||||||
@ -756,7 +756,7 @@ ExecutePlan(EState *estate,
|
|||||||
CmdType operation,
|
CmdType operation,
|
||||||
int numberTuples,
|
int numberTuples,
|
||||||
ScanDirection direction,
|
ScanDirection direction,
|
||||||
void (*printfunc) ())
|
DestReceiver *destfunc)
|
||||||
{
|
{
|
||||||
JunkFilter *junkfilter;
|
JunkFilter *junkfilter;
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ lmark:;
|
|||||||
{
|
{
|
||||||
case CMD_SELECT:
|
case CMD_SELECT:
|
||||||
ExecRetrieve(slot, /* slot containing tuple */
|
ExecRetrieve(slot, /* slot containing tuple */
|
||||||
printfunc, /* print function */
|
destfunc, /* print function */
|
||||||
estate); /* */
|
estate); /* */
|
||||||
result = slot;
|
result = slot;
|
||||||
break;
|
break;
|
||||||
@ -997,7 +997,7 @@ lmark:;
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ExecRetrieve(TupleTableSlot *slot,
|
ExecRetrieve(TupleTableSlot *slot,
|
||||||
void (*printfunc) (),
|
DestReceiver *destfunc,
|
||||||
EState *estate)
|
EState *estate)
|
||||||
{
|
{
|
||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
@ -1139,8 +1139,7 @@ ExecDelete(TupleTableSlot *slot,
|
|||||||
{
|
{
|
||||||
RelationInfo *resultRelationInfo;
|
RelationInfo *resultRelationInfo;
|
||||||
Relation resultRelationDesc;
|
Relation resultRelationDesc;
|
||||||
ItemPointerData ctid,
|
ItemPointerData ctid;
|
||||||
oldtid;
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
/******************
|
/******************
|
||||||
@ -1180,12 +1179,11 @@ ldelete:;
|
|||||||
elog(ERROR, "Can't serialize access due to concurrent update");
|
elog(ERROR, "Can't serialize access due to concurrent update");
|
||||||
else if (!(ItemPointerEquals(tupleid, &ctid)))
|
else if (!(ItemPointerEquals(tupleid, &ctid)))
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = EvalPlanQual(estate,
|
TupleTableSlot *epqslot = EvalPlanQual(estate,
|
||||||
resultRelationInfo->ri_RangeTableIndex, &ctid);
|
resultRelationInfo->ri_RangeTableIndex, &ctid);
|
||||||
|
|
||||||
if (!TupIsNull(slot))
|
if (!TupIsNull(epqslot))
|
||||||
{
|
{
|
||||||
tupleid = &oldtid;
|
|
||||||
*tupleid = ctid;
|
*tupleid = ctid;
|
||||||
goto ldelete;
|
goto ldelete;
|
||||||
}
|
}
|
||||||
@ -1238,8 +1236,7 @@ ExecReplace(TupleTableSlot *slot,
|
|||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
RelationInfo *resultRelationInfo;
|
RelationInfo *resultRelationInfo;
|
||||||
Relation resultRelationDesc;
|
Relation resultRelationDesc;
|
||||||
ItemPointerData ctid,
|
ItemPointerData ctid;
|
||||||
oldtid;
|
|
||||||
int result;
|
int result;
|
||||||
int numIndices;
|
int numIndices;
|
||||||
|
|
||||||
@ -1321,13 +1318,14 @@ lreplace:;
|
|||||||
elog(ERROR, "Can't serialize access due to concurrent update");
|
elog(ERROR, "Can't serialize access due to concurrent update");
|
||||||
else if (!(ItemPointerEquals(tupleid, &ctid)))
|
else if (!(ItemPointerEquals(tupleid, &ctid)))
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = EvalPlanQual(estate,
|
TupleTableSlot *epqslot = EvalPlanQual(estate,
|
||||||
resultRelationInfo->ri_RangeTableIndex, &ctid);
|
resultRelationInfo->ri_RangeTableIndex, &ctid);
|
||||||
|
|
||||||
if (!TupIsNull(slot))
|
if (!TupIsNull(epqslot))
|
||||||
{
|
{
|
||||||
tupleid = &oldtid;
|
|
||||||
*tupleid = ctid;
|
*tupleid = ctid;
|
||||||
|
tuple = ExecRemoveJunk(estate->es_junkFilter, epqslot);
|
||||||
|
slot = ExecStoreTuple(tuple, slot, InvalidBuffer, true);
|
||||||
goto lreplace;
|
goto lreplace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user