diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 3636993387528df91849d117ed59d66f11cc9c7e..610066893bc9f8eb21ae2667433026d586110014 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.59 1999/11/23 20:06:47 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.60 1999/11/24 00:44:28 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -22,7 +22,7 @@
  *		heap_fetch		- retrive tuple with tid
  *		heap_insert		- insert tuple into a relation
  *		heap_delete		- delete a tuple from a relation
- *		heap_replace	- replace a tuple in a relation with another tuple
+ *		heap_update	- replace a tuple in a relation with another tuple
  *		heap_markpos	- mark scan position
  *		heap_restrpos	- restore position to marked location
  *
@@ -1339,10 +1339,10 @@ l1:
 }
 
 /*
- *	heap_replace	- replace a tuple
+ *	heap_update	- replace a tuple
  */
 int
-heap_replace(Relation relation, ItemPointer otid, HeapTuple newtup,
+heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
 			 ItemPointer ctid)
 {
 	ItemId		lp;
@@ -1376,7 +1376,7 @@ l2:
 	{
 		LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
 		ReleaseBuffer(buffer);
-		elog(ERROR, "heap_replace: (am)invalid tid");
+		elog(ERROR, "heap_update: (am)invalid tid");
 	}
 	else if (result == HeapTupleBeingUpdated)
 	{
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 0744f47b63b64bda3262b15ca32ed69adbccc828..701cb4df149ee053e2c531613515929197933be0 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.30 1999/11/22 17:55:56 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.31 1999/11/24 00:44:28 momjian Exp $
  *
  * NOTES
  *	  See acl.h.
@@ -102,7 +102,7 @@ ChangeAcl(char *relname,
 	 * Find the pg_class tuple matching 'relname' and extract the ACL. If
 	 * there's no ACL, create a default using the pg_class.relowner field.
 	 *
-	 * We can't use the syscache here, since we need to do a heap_replace on
+	 * We can't use the syscache here, since we need to do a heap_update on
 	 * the tuple we find.
 	 */
 	relation = heap_openr(RelationRelationName, RowExclusiveLock);
@@ -151,7 +151,7 @@ ChangeAcl(char *relname,
 	tuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
 	/* XXX handle index on pg_class? */
 	setheapoverride(true);
-	heap_replace(relation, &tuple->t_self, tuple, NULL);
+	heap_update(relation, &tuple->t_self, tuple, NULL);
 	setheapoverride(false);
 
 	/* keep the catalog indices up to date */
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index 873873dff41edded3eb16385de0e15259e149404..475414e1644256ab157b508712cf6214590981c8 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.109 1999/11/22 17:55:57 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.110 1999/11/24 00:44:29 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -1763,7 +1763,7 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin,
 	if (! attStruct->atthasdef)
 	{
 		attStruct->atthasdef = true;
-		heap_replace(attrrel, &atttup->t_self, atttup, NULL);
+		heap_update(attrrel, &atttup->t_self, atttup, NULL);
 		/* keep catalog indices current */
 		CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices,
 						   attridescs);
@@ -2085,7 +2085,7 @@ AddRelationRawConstraints(Relation rel,
 
 	relStruct->relchecks = numchecks;
 
-	heap_replace(relrel, &reltup->t_self, reltup, NULL);
+	heap_update(relrel, &reltup->t_self, reltup, NULL);
 
 	/* keep catalog indices current */
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices,
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index d33d97c2bad7f131a5e1204b8407d07a645308fb..75795ca0154e46ff6485ada3d9073fa1685a7d45 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.97 1999/11/22 17:55:57 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.98 1999/11/24 00:44:29 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -839,7 +839,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
 
 	newtup = heap_modifytuple(tuple, pg_index, values, nulls, replace);
 
-	heap_replace(pg_index, &newtup->t_self, newtup, NULL);
+	heap_update(pg_index, &newtup->t_self, newtup, NULL);
 
 	pfree(newtup);
 	heap_close(pg_index, RowExclusiveLock);
@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
 		values[Anum_pg_class_relhasindex - 1] = CharGetDatum(hasindex);
 
 		newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
-		heap_replace(pg_class, &tuple->t_self, newtup, NULL);
+		heap_update(pg_class, &tuple->t_self, newtup, NULL);
 		CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
 		CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
 		CatalogCloseIndices(Num_pg_class_indices, idescs);
diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index ad035ae8012bd39b9b668568b9f0a6a232c03567..5ce7655edd47010bd9c30f8e19ff37885d15c7ca 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.43 1999/11/22 17:55:58 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.44 1999/11/24 00:44:29 momjian Exp $
  *
  * NOTES
  *	  these routines moved here from commands/define.c and somewhat cleaned up.
@@ -791,7 +791,7 @@ OperatorDef(char *operatorName,
 								   replaces);
 
 			setheapoverride(true);
-			heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
+			heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
 			setheapoverride(false);
 		}
 		else
@@ -921,7 +921,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
 									   replaces);
 
 				setheapoverride(true);
-				heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
+				heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
 				setheapoverride(false);
 		
 				if (RelationGetForm(pg_operator_desc)->relhasindex)
@@ -955,7 +955,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
 							   replaces);
 
 		setheapoverride(true);
-		heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
+		heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
 		setheapoverride(false);
 
 		if (RelationGetForm(pg_operator_desc)->relhasindex)
@@ -995,7 +995,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
 							   replaces);
 
 		setheapoverride(true);
-		heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
+		heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
 		setheapoverride(false);
 
 		if (RelationGetForm(pg_operator_desc)->relhasindex)
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index f252933d6f02cedd5f2df45c85d8a7de30c631f6..9ec3c3fd82250cdfda0d83267efa30a851e5cd30 100644
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.42 1999/11/22 17:55:58 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.43 1999/11/24 00:44:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -482,7 +482,7 @@ TypeCreate(char *typeName,
 							   replaces);
 
 		setheapoverride(true);
-		heap_replace(pg_type_desc, &tup->t_self, tup, NULL);
+		heap_update(pg_type_desc, &tup->t_self, tup, NULL);
 		setheapoverride(false);
 
 		typeObjectId = tup->t_data->t_oid;
@@ -559,7 +559,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
 	namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
 
 	setheapoverride(true);
-	heap_replace(pg_type_desc, &oldtup->t_self, oldtup, NULL);
+	heap_update(pg_type_desc, &oldtup->t_self, oldtup, NULL);
 	setheapoverride(false);
 
 	/* update the system catalog indices */
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index cc1b9517b60f5f520fca04f7e45b3a7bac6d513d..2267a2415e7cd2360e04303d67478afcd0930a1e 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -6,7 +6,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.55 1999/11/22 17:55:59 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.56 1999/11/24 00:44:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -509,7 +509,7 @@ AtCommit_Notify()
 					{
 						rTuple = heap_modifytuple(lTuple, lRel,
 												  value, nulls, repl);
-						heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
+						heap_update(lRel, &lTuple->t_self, rTuple, NULL);
 						if (RelationGetForm(lRel)->relhasindex)
 						{
 							Relation	idescs[Num_pg_listener_indices];
@@ -775,7 +775,7 @@ ProcessIncomingNotify(void)
 			NotifyMyFrontEnd(relname, sourcePID);
 			/* Rewrite the tuple with 0 in notification column */
 			rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
-			heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
+			heap_update(lRel, &lTuple->t_self, rTuple, NULL);
 			if (RelationGetForm(lRel)->relhasindex)
 			{
 				Relation	idescs[Num_pg_listener_indices];
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index 1746eefbe3ec08ecca6fd4afa42f42675c500f05..84e9331abe781b16545808076bcd90ba35e71baa 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.57 1999/11/22 17:56:00 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.58 1999/11/24 00:44:30 momjian Exp $
  *
  * NOTES
  *	  The PortalExecutorHeapMemory crap needs to be eliminated
@@ -474,7 +474,7 @@ PerformAddAttribute(char *relationName,
 	heap_close(attrdesc, RowExclusiveLock);
 
 	((Form_pg_class) GETSTRUCT(reltup))->relnatts = maxatts;
-	heap_replace(rel, &reltup->t_self, reltup, NULL);
+	heap_update(rel, &reltup->t_self, reltup, NULL);
 
 	/* keep catalog indices current */
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index e7419252b7cd5768efbd799093c33f22fc90f14e..4d58eb3ccc1984a019db30ce6156766ac25c882a 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -157,7 +157,7 @@ void CreateComments(Oid oid, char *comment) {
 
   if (HeapTupleIsValid(searchtuple)) {
         
-    /*** If the comment is blank, call heap_delete, else heap_replace ***/
+    /*** If the comment is blank, call heap_delete, else heap_update ***/
 
     if ((comment == NULL) || (strlen(comment) == 0)) {
       heap_delete(description, &searchtuple->t_self, NULL);
@@ -165,7 +165,7 @@ void CreateComments(Oid oid, char *comment) {
       desctuple = heap_modifytuple(searchtuple, description, values, 
 				   nulls, replaces);      
       setheapoverride(true);
-      heap_replace(description, &searchtuple->t_self, desctuple, NULL);
+      heap_update(description, &searchtuple->t_self, desctuple, NULL);
       setheapoverride(false);
       modified = TRUE;
     }
diff --git a/src/backend/commands/rename.c b/src/backend/commands/rename.c
index 85a49e59f3db4ceeac0c479b23bb24c67c3dd737..288c9404c128c7a83b20a45ee0bdba5872b906a6 100644
--- a/src/backend/commands/rename.c
+++ b/src/backend/commands/rename.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.35 1999/11/07 23:08:02 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.36 1999/11/24 00:44:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -156,7 +156,7 @@ renameatt(char *relname,
 	StrNCpy(NameStr(((Form_pg_attribute) GETSTRUCT(oldatttup))->attname),
 			newattname, NAMEDATALEN);
 
-	heap_replace(attrelation, &oldatttup->t_self, oldatttup, NULL);
+	heap_update(attrelation, &oldatttup->t_self, oldatttup, NULL);
 
 	/* keep system catalog indices current */
 	CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations);
@@ -291,7 +291,7 @@ renamerel(char *oldrelname, char *newrelname)
 	StrNCpy(NameStr(((Form_pg_class) GETSTRUCT(oldreltup))->relname),
 			newrelname, NAMEDATALEN);
 
-	heap_replace(relrelation, &oldreltup->t_self, oldreltup, NULL);
+	heap_update(relrelation, &oldreltup->t_self, oldreltup, NULL);
 
 	/* keep the system catalog indices current */
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, irelations);
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 93ae9ba36aa1f534046ae1fa9236f90607300ac7..9d23f255e5918729e68c6a3fff70d39859777d2f 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -250,7 +250,7 @@ CreateTrigger(CreateTrigStmt *stmt)
 
 	((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1;
 	RelationInvalidateHeapTuple(pgrel, tuple);
-	heap_replace(pgrel, &tuple->t_self, tuple, NULL);
+	heap_update(pgrel, &tuple->t_self, tuple, NULL);
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
 	CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
 	CatalogCloseIndices(Num_pg_class_indices, ridescs);
@@ -329,7 +329,7 @@ DropTrigger(DropTrigStmt *stmt)
 
 	((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found;
 	RelationInvalidateHeapTuple(pgrel, tuple);
-	heap_replace(pgrel, &tuple->t_self, tuple, NULL);
+	heap_update(pgrel, &tuple->t_self, tuple, NULL);
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
 	CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
 	CatalogCloseIndices(Num_pg_class_indices, ridescs);
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 1785093d0ec47cb1f22a9b1bd1e8673c33d2cd4b..4d5b25a7d9f864d752d8419729ef96f144f474c6 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.100 1999/11/07 23:08:05 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.101 1999/11/24 00:44:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1350,7 +1350,7 @@ ExecReplace(TupleTableSlot *slot,
 	 * replace the heap tuple
 	 */
 lreplace:;
-	result = heap_replace(resultRelationDesc, tupleid, tuple, &ctid);
+	result = heap_update(resultRelationDesc, tupleid, tuple, &ctid);
 	switch (result)
 	{
 		case HeapTupleSelfUpdated:
@@ -1378,7 +1378,7 @@ lreplace:;
 			return;
 
 		default:
-			elog(ERROR, "Unknown status %u from heap_replace", result);
+			elog(ERROR, "Unknown status %u from heap_update", result);
 			return;
 	}
 
@@ -1396,7 +1396,7 @@ lreplace:;
 	/*
 	 * process indices
 	 *
-	 * heap_replace updates a tuple in the base relation by invalidating it
+	 * heap_update updates a tuple in the base relation by invalidating it
 	 * and then appending 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
diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c
index 47d8fc88de5b170e33152f6fa2ae2254d05bc6b4..08438d2ae6c2028f5e097142753e816bc2f8fc6f 100644
--- a/src/backend/rewrite/rewriteSupport.c
+++ b/src/backend/rewrite/rewriteSupport.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.38 1999/11/22 17:56:23 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.39 1999/11/24 00:44:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -106,7 +106,7 @@ setRelhasrulesInRelation(Oid relationId, bool relhasrules)
 	Assert(HeapTupleIsValid(tuple));
 
 	((Form_pg_class) GETSTRUCT(tuple))->relhasrules = relhasrules;
-	heap_replace(relationRelation, &tuple->t_self, tuple, NULL);
+	heap_update(relationRelation, &tuple->t_self, tuple, NULL);
 
 	/* keep the catalog indices up to date */
 	CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c
index 964012a31e4f37c2f0019cd9b51b4540b723641a..ba94496cea5758aeefcfea8e9aef204c4f1db06a 100644
--- a/src/backend/utils/adt/sets.c
+++ b/src/backend/utils/adt/sets.c
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.27 1999/11/22 17:56:30 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.28 1999/11/24 00:44:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -114,7 +114,7 @@ SetDefine(char *querystr, char *typename)
 									  repl);
 
 			setheapoverride(true);
-			heap_replace(procrel, &tup->t_self, newtup, NULL);
+			heap_update(procrel, &tup->t_self, newtup, NULL);
 			setheapoverride(false);
 
 			setoid = newtup->t_data->t_oid;
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index b672b58053eda8b58005e31774d058ef82eefafc..239c3c468eb5848b295ca70062f26a82df43ca8f 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.47 1999/10/11 06:28:29 inoue Exp $
+ * $Id: heapam.h,v 1.48 1999/11/24 00:44:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -259,7 +259,7 @@ extern void heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tup, Buff
 extern ItemPointer heap_get_latest_tid(Relation relation, Snapshot snapshot, ItemPointer tid);
 extern Oid	heap_insert(Relation relation, HeapTuple tup);
 extern int	heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid);
-extern int heap_replace(Relation relation, ItemPointer otid, HeapTuple tup,
+extern int heap_update(Relation relation, ItemPointer otid, HeapTuple tup,
 			 ItemPointer ctid);
 extern int	heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf);
 extern void heap_markpos(HeapScanDesc scan);