diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-11-27 19:52:36 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-11-27 19:52:36 +0000 |
commit | 6beba218d7f6f764e946751df6dc0d0180da05fa (patch) | |
tree | 2801029d61d798d6150bb43a24561a4615aedb8b /src/backend/executor/execMain.c | |
parent | 2435c7d501b0a3129f6fc597a9c85863541cd596 (diff) | |
download | postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.tar.gz postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.zip |
New HeapTuple structure/interface.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index a7a7cb93cc8..45be159ae17 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.58 1998/10/14 05:10:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.59 1998/11/27 19:51:59 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -963,16 +963,7 @@ ExecAppend(TupleTableSlot *slot, if (resultRelationDesc->rd_att->constr) { - HeapTuple newtuple; - - newtuple = ExecConstraints("ExecAppend", resultRelationDesc, tuple); - - if (newtuple != tuple) /* modified by DEFAULT */ - { - Assert(slot->ttc_shouldFree); - pfree(tuple); - slot->val = tuple = newtuple; - } + ExecConstraints("ExecAppend", resultRelationDesc, tuple); } /****************** @@ -993,7 +984,7 @@ ExecAppend(TupleTableSlot *slot, */ numIndices = resultRelationInfo->ri_NumIndices; if (numIndices > 0) - ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, false); + ExecInsertIndexTuples(slot, &(tuple->t_self), estate, false); (estate->es_processed)++; estate->es_lastoid = newId; @@ -1146,16 +1137,7 @@ ExecReplace(TupleTableSlot *slot, if (resultRelationDesc->rd_att->constr) { - HeapTuple newtuple; - - newtuple = ExecConstraints("ExecReplace", resultRelationDesc, tuple); - - if (newtuple != tuple) /* modified by DEFAULT */ - { - Assert(slot->ttc_shouldFree); - pfree(tuple); - slot->val = tuple = newtuple; - } + ExecConstraints("ExecReplace", resultRelationDesc, tuple); } /****************** @@ -1200,7 +1182,7 @@ ExecReplace(TupleTableSlot *slot, numIndices = resultRelationInfo->ri_NumIndices; if (numIndices > 0) - ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, true); + ExecInsertIndexTuples(slot, &(tuple->t_self), estate, true); /* AFTER ROW UPDATE Triggers */ if (resultRelationDesc->trigdesc && @@ -1334,18 +1316,12 @@ ExecRelCheck(Relation rel, HeapTuple tuple) } -HeapTuple +void ExecConstraints(char *caller, Relation rel, HeapTuple tuple) { - HeapTuple newtuple = tuple; Assert(rel->rd_att->constr); -#if 0 - if (rel->rd_att->constr->num_defval > 0) - newtuple = tuple = ExecAttrDefault(rel, tuple); -#endif - if (rel->rd_att->constr->has_not_null) { int attrChk; @@ -1366,5 +1342,5 @@ ExecConstraints(char *caller, Relation rel, HeapTuple tuple) elog(ERROR, "%s: rejected due to CHECK constraint %s", caller, failed); } - return newtuple; + return; } |