mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
Rename heap_replace to heap_update.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user