aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-18 21:34:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-18 21:34:20 +0000
commit77b4bd3b43a2f9223269e1c3a04454876e1885e3 (patch)
tree7febf09c26b3525ef14a9726678090191e5716d4 /src/backend/executor/execMain.c
parentdfdf07aab109fd883877fd11819ac2e2981093d8 (diff)
downloadpostgresql-77b4bd3b43a2f9223269e1c3a04454876e1885e3.tar.gz
postgresql-77b4bd3b43a2f9223269e1c3a04454876e1885e3.zip
Update some obsolete comments --- code is using t_self now, not t_ctid.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index bcf7d82d30d..eb485ad5476 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.252 2005/08/01 20:31:07 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.253 2005/08/18 21:34:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1371,7 +1371,6 @@ ExecInsert(TupleTableSlot *slot,
HeapTuple tuple;
ResultRelInfo *resultRelInfo;
Relation resultRelationDesc;
- int numIndices;
Oid newId;
/*
@@ -1418,6 +1417,9 @@ ExecInsert(TupleTableSlot *slot,
/*
* insert the tuple
+ *
+ * Note: heap_insert returns the tid (location) of the new tuple
+ * in the t_self field.
*/
newId = heap_insert(resultRelationDesc, tuple,
estate->es_snapshot->curcid,
@@ -1429,14 +1431,9 @@ ExecInsert(TupleTableSlot *slot,
setLastTid(&(tuple->t_self));
/*
- * process indices
- *
- * Note: heap_insert adds a new tuple to a relation. As a side effect,
- * the tupleid of the new tuple is placed in the new tuple's t_ctid
- * field.
+ * insert index entries for tuple
*/
- numIndices = resultRelInfo->ri_NumIndices;
- if (numIndices > 0)
+ if (resultRelInfo->ri_NumIndices > 0)
ExecInsertIndexTuples(slot, &(tuple->t_self), estate, false);
/* AFTER ROW INSERT Triggers */
@@ -1563,7 +1560,6 @@ ExecUpdate(TupleTableSlot *slot,
Relation resultRelationDesc;
ItemPointerData ctid;
HTSU_Result result;
- int numIndices;
/*
* abort the operation if not running transactions
@@ -1676,23 +1672,18 @@ lreplace:;
/*
* Note: instead of having to update the old index tuples associated
* with the heap tuple, all we do is form and insert new index tuples.
- * This is because UPDATEs are actually DELETEs and INSERTs and index
+ * This is because UPDATEs are actually DELETEs and INSERTs, and index
* tuple deletion is done automagically by the vacuum daemon. All we
* do is insert new index tuples. -cim 9/27/89
*/
/*
- * process indices
+ * insert index entries for tuple
*
- * heap_update updates a tuple in the base relation by invalidating it
- * and then inserting a new tuple to the relation. As a side effect,
- * the tupleid of the new tuple is placed in the new tuple's t_ctid
- * field. So we now insert index tuples using the new tupleid stored
- * there.
+ * Note: heap_update returns the tid (location) of the new tuple
+ * in the t_self field.
*/
-
- numIndices = resultRelInfo->ri_NumIndices;
- if (numIndices > 0)
+ if (resultRelInfo->ri_NumIndices > 0)
ExecInsertIndexTuples(slot, &(tuple->t_self), estate, false);
/* AFTER ROW UPDATE Triggers */