Commit bb10bf31 authored by Bruce Momjian's avatar Bruce Momjian

Rename heap_replace to heap_update.

parent 6f9ff92c
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* heap_fetch - retrive tuple with tid * heap_fetch - retrive tuple with tid
* heap_insert - insert tuple into a relation * heap_insert - insert tuple into a relation
* heap_delete - delete a tuple from 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_markpos - mark scan position
* heap_restrpos - restore position to marked location * heap_restrpos - restore position to marked location
* *
...@@ -1339,10 +1339,10 @@ l1: ...@@ -1339,10 +1339,10 @@ l1:
} }
/* /*
* heap_replace - replace a tuple * heap_update - replace a tuple
*/ */
int int
heap_replace(Relation relation, ItemPointer otid, HeapTuple newtup, heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
ItemPointer ctid) ItemPointer ctid)
{ {
ItemId lp; ItemId lp;
...@@ -1376,7 +1376,7 @@ l2: ...@@ -1376,7 +1376,7 @@ l2:
{ {
LockBuffer(buffer, BUFFER_LOCK_UNLOCK); LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
ReleaseBuffer(buffer); ReleaseBuffer(buffer);
elog(ERROR, "heap_replace: (am)invalid tid"); elog(ERROR, "heap_update: (am)invalid tid");
} }
else if (result == HeapTupleBeingUpdated) else if (result == HeapTupleBeingUpdated)
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* See acl.h. * See acl.h.
...@@ -102,7 +102,7 @@ ChangeAcl(char *relname, ...@@ -102,7 +102,7 @@ ChangeAcl(char *relname,
* Find the pg_class tuple matching 'relname' and extract the ACL. If * 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. * 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. * the tuple we find.
*/ */
relation = heap_openr(RelationRelationName, RowExclusiveLock); relation = heap_openr(RelationRelationName, RowExclusiveLock);
...@@ -151,7 +151,7 @@ ChangeAcl(char *relname, ...@@ -151,7 +151,7 @@ ChangeAcl(char *relname,
tuple = heap_modifytuple(tuple, relation, values, nulls, replaces); tuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
/* XXX handle index on pg_class? */ /* XXX handle index on pg_class? */
setheapoverride(true); setheapoverride(true);
heap_replace(relation, &tuple->t_self, tuple, NULL); heap_update(relation, &tuple->t_self, tuple, NULL);
setheapoverride(false); setheapoverride(false);
/* keep the catalog indices up to date */ /* keep the catalog indices up to date */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -1763,7 +1763,7 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin, ...@@ -1763,7 +1763,7 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin,
if (! attStruct->atthasdef) if (! attStruct->atthasdef)
{ {
attStruct->atthasdef = true; attStruct->atthasdef = true;
heap_replace(attrrel, &atttup->t_self, atttup, NULL); heap_update(attrrel, &atttup->t_self, atttup, NULL);
/* keep catalog indices current */ /* keep catalog indices current */
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices,
attridescs); attridescs);
...@@ -2085,7 +2085,7 @@ AddRelationRawConstraints(Relation rel, ...@@ -2085,7 +2085,7 @@ AddRelationRawConstraints(Relation rel,
relStruct->relchecks = numchecks; relStruct->relchecks = numchecks;
heap_replace(relrel, &reltup->t_self, reltup, NULL); heap_update(relrel, &reltup->t_self, reltup, NULL);
/* keep catalog indices current */ /* keep catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -839,7 +839,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate) ...@@ -839,7 +839,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
newtup = heap_modifytuple(tuple, pg_index, values, nulls, replace); 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); pfree(newtup);
heap_close(pg_index, RowExclusiveLock); heap_close(pg_index, RowExclusiveLock);
...@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex) ...@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
values[Anum_pg_class_relhasindex - 1] = CharGetDatum(hasindex); values[Anum_pg_class_relhasindex - 1] = CharGetDatum(hasindex);
newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace); 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); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup); CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
CatalogCloseIndices(Num_pg_class_indices, idescs); CatalogCloseIndices(Num_pg_class_indices, idescs);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* these routines moved here from commands/define.c and somewhat cleaned up. * these routines moved here from commands/define.c and somewhat cleaned up.
...@@ -791,7 +791,7 @@ OperatorDef(char *operatorName, ...@@ -791,7 +791,7 @@ OperatorDef(char *operatorName,
replaces); replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL); heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
setheapoverride(false); setheapoverride(false);
} }
else else
...@@ -921,7 +921,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) ...@@ -921,7 +921,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
replaces); replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL); heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
setheapoverride(false); setheapoverride(false);
if (RelationGetForm(pg_operator_desc)->relhasindex) if (RelationGetForm(pg_operator_desc)->relhasindex)
...@@ -955,7 +955,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) ...@@ -955,7 +955,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
replaces); replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL); heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
setheapoverride(false); setheapoverride(false);
if (RelationGetForm(pg_operator_desc)->relhasindex) if (RelationGetForm(pg_operator_desc)->relhasindex)
...@@ -995,7 +995,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) ...@@ -995,7 +995,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
replaces); replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL); heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
setheapoverride(false); setheapoverride(false);
if (RelationGetForm(pg_operator_desc)->relhasindex) if (RelationGetForm(pg_operator_desc)->relhasindex)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -482,7 +482,7 @@ TypeCreate(char *typeName,
replaces); replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_type_desc, &tup->t_self, tup, NULL); heap_update(pg_type_desc, &tup->t_self, tup, NULL);
setheapoverride(false); setheapoverride(false);
typeObjectId = tup->t_data->t_oid; typeObjectId = tup->t_data->t_oid;
...@@ -559,7 +559,7 @@ TypeRename(char *oldTypeName, char *newTypeName) ...@@ -559,7 +559,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName); namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
setheapoverride(true); setheapoverride(true);
heap_replace(pg_type_desc, &oldtup->t_self, oldtup, NULL); heap_update(pg_type_desc, &oldtup->t_self, oldtup, NULL);
setheapoverride(false); setheapoverride(false);
/* update the system catalog indices */ /* update the system catalog indices */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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() ...@@ -509,7 +509,7 @@ AtCommit_Notify()
{ {
rTuple = heap_modifytuple(lTuple, lRel, rTuple = heap_modifytuple(lTuple, lRel,
value, nulls, repl); value, nulls, repl);
heap_replace(lRel, &lTuple->t_self, rTuple, NULL); heap_update(lRel, &lTuple->t_self, rTuple, NULL);
if (RelationGetForm(lRel)->relhasindex) if (RelationGetForm(lRel)->relhasindex)
{ {
Relation idescs[Num_pg_listener_indices]; Relation idescs[Num_pg_listener_indices];
...@@ -775,7 +775,7 @@ ProcessIncomingNotify(void) ...@@ -775,7 +775,7 @@ ProcessIncomingNotify(void)
NotifyMyFrontEnd(relname, sourcePID); NotifyMyFrontEnd(relname, sourcePID);
/* Rewrite the tuple with 0 in notification column */ /* Rewrite the tuple with 0 in notification column */
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl); 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) if (RelationGetForm(lRel)->relhasindex)
{ {
Relation idescs[Num_pg_listener_indices]; Relation idescs[Num_pg_listener_indices];
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated * The PortalExecutorHeapMemory crap needs to be eliminated
...@@ -474,7 +474,7 @@ PerformAddAttribute(char *relationName, ...@@ -474,7 +474,7 @@ PerformAddAttribute(char *relationName,
heap_close(attrdesc, RowExclusiveLock); heap_close(attrdesc, RowExclusiveLock);
((Form_pg_class) GETSTRUCT(reltup))->relnatts = maxatts; ((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 */ /* keep catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
......
...@@ -157,7 +157,7 @@ void CreateComments(Oid oid, char *comment) { ...@@ -157,7 +157,7 @@ void CreateComments(Oid oid, char *comment) {
if (HeapTupleIsValid(searchtuple)) { 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)) { if ((comment == NULL) || (strlen(comment) == 0)) {
heap_delete(description, &searchtuple->t_self, NULL); heap_delete(description, &searchtuple->t_self, NULL);
...@@ -165,7 +165,7 @@ void CreateComments(Oid oid, char *comment) { ...@@ -165,7 +165,7 @@ void CreateComments(Oid oid, char *comment) {
desctuple = heap_modifytuple(searchtuple, description, values, desctuple = heap_modifytuple(searchtuple, description, values,
nulls, replaces); nulls, replaces);
setheapoverride(true); setheapoverride(true);
heap_replace(description, &searchtuple->t_self, desctuple, NULL); heap_update(description, &searchtuple->t_self, desctuple, NULL);
setheapoverride(false); setheapoverride(false);
modified = TRUE; modified = TRUE;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -156,7 +156,7 @@ renameatt(char *relname,
StrNCpy(NameStr(((Form_pg_attribute) GETSTRUCT(oldatttup))->attname), StrNCpy(NameStr(((Form_pg_attribute) GETSTRUCT(oldatttup))->attname),
newattname, NAMEDATALEN); newattname, NAMEDATALEN);
heap_replace(attrelation, &oldatttup->t_self, oldatttup, NULL); heap_update(attrelation, &oldatttup->t_self, oldatttup, NULL);
/* keep system catalog indices current */ /* keep system catalog indices current */
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations); CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations);
...@@ -291,7 +291,7 @@ renamerel(char *oldrelname, char *newrelname) ...@@ -291,7 +291,7 @@ renamerel(char *oldrelname, char *newrelname)
StrNCpy(NameStr(((Form_pg_class) GETSTRUCT(oldreltup))->relname), StrNCpy(NameStr(((Form_pg_class) GETSTRUCT(oldreltup))->relname),
newrelname, NAMEDATALEN); newrelname, NAMEDATALEN);
heap_replace(relrelation, &oldreltup->t_self, oldreltup, NULL); heap_update(relrelation, &oldreltup->t_self, oldreltup, NULL);
/* keep the system catalog indices current */ /* keep the system catalog indices current */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, irelations); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, irelations);
......
...@@ -250,7 +250,7 @@ CreateTrigger(CreateTrigStmt *stmt) ...@@ -250,7 +250,7 @@ CreateTrigger(CreateTrigStmt *stmt)
((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1; ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found + 1;
RelationInvalidateHeapTuple(pgrel, tuple); 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); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple); CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
CatalogCloseIndices(Num_pg_class_indices, ridescs); CatalogCloseIndices(Num_pg_class_indices, ridescs);
...@@ -329,7 +329,7 @@ DropTrigger(DropTrigStmt *stmt) ...@@ -329,7 +329,7 @@ DropTrigger(DropTrigStmt *stmt)
((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found; ((Form_pg_class) GETSTRUCT(tuple))->reltriggers = found;
RelationInvalidateHeapTuple(pgrel, tuple); 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); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);
CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple); CatalogIndexInsert(ridescs, Num_pg_class_indices, pgrel, tuple);
CatalogCloseIndices(Num_pg_class_indices, ridescs); CatalogCloseIndices(Num_pg_class_indices, ridescs);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -1350,7 +1350,7 @@ ExecReplace(TupleTableSlot *slot,
* replace the heap tuple * replace the heap tuple
*/ */
lreplace:; lreplace:;
result = heap_replace(resultRelationDesc, tupleid, tuple, &ctid); result = heap_update(resultRelationDesc, tupleid, tuple, &ctid);
switch (result) switch (result)
{ {
case HeapTupleSelfUpdated: case HeapTupleSelfUpdated:
...@@ -1378,7 +1378,7 @@ lreplace:; ...@@ -1378,7 +1378,7 @@ lreplace:;
return; return;
default: default:
elog(ERROR, "Unknown status %u from heap_replace", result); elog(ERROR, "Unknown status %u from heap_update", result);
return; return;
} }
...@@ -1396,7 +1396,7 @@ lreplace:; ...@@ -1396,7 +1396,7 @@ lreplace:;
/* /*
* process indices * 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, * 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 * 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 * field. So we now insert index tuples using the new tupleid stored
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -106,7 +106,7 @@ setRelhasrulesInRelation(Oid relationId, bool relhasrules)
Assert(HeapTupleIsValid(tuple)); Assert(HeapTupleIsValid(tuple));
((Form_pg_class) GETSTRUCT(tuple))->relhasrules = relhasrules; ((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 */ /* keep the catalog indices up to date */
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs); CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -114,7 +114,7 @@ SetDefine(char *querystr, char *typename)
repl); repl);
setheapoverride(true); setheapoverride(true);
heap_replace(procrel, &tup->t_self, newtup, NULL); heap_update(procrel, &tup->t_self, newtup, NULL);
setheapoverride(false); setheapoverride(false);
setoid = newtup->t_data->t_oid; setoid = newtup->t_data->t_oid;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 ...@@ -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 ItemPointer heap_get_latest_tid(Relation relation, Snapshot snapshot, ItemPointer tid);
extern Oid heap_insert(Relation relation, HeapTuple tup); extern Oid heap_insert(Relation relation, HeapTuple tup);
extern int heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid); 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); ItemPointer ctid);
extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf); extern int heap_mark4update(Relation relation, HeapTuple tup, Buffer *userbuf);
extern void heap_markpos(HeapScanDesc scan); extern void heap_markpos(HeapScanDesc scan);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment