Skip to content

Commit bb10bf3

Browse files
committed
Rename heap_replace to heap_update.
1 parent 6f9ff92 commit bb10bf3

File tree

15 files changed

+44
-44
lines changed

15 files changed

+44
-44
lines changed

src/backend/access/heap/heapam.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.59 1999/11/23 20:06:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.60 1999/11/24 00:44:28 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -22,7 +22,7 @@
2222
* heap_fetch - retrive tuple with tid
2323
* heap_insert - insert tuple into a relation
2424
* heap_delete - delete a tuple from a relation
25-
* heap_replace - replace a tuple in a relation with another tuple
25+
* heap_update - replace a tuple in a relation with another tuple
2626
* heap_markpos - mark scan position
2727
* heap_restrpos - restore position to marked location
2828
*
@@ -1339,10 +1339,10 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
13391339
}
13401340

13411341
/*
1342-
* heap_replace - replace a tuple
1342+
* heap_update - replace a tuple
13431343
*/
13441344
int
1345-
heap_replace(Relation relation, ItemPointer otid, HeapTuple newtup,
1345+
heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
13461346
ItemPointer ctid)
13471347
{
13481348
ItemId lp;
@@ -1376,7 +1376,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple newtup,
13761376
{
13771377
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
13781378
ReleaseBuffer(buffer);
1379-
elog(ERROR, "heap_replace: (am)invalid tid");
1379+
elog(ERROR, "heap_update: (am)invalid tid");
13801380
}
13811381
else if (result == HeapTupleBeingUpdated)
13821382
{

src/backend/catalog/aclchk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.30 1999/11/22 17:55:56 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.31 1999/11/24 00:44:28 momjian Exp $
1111
*
1212
* NOTES
1313
* See acl.h.
@@ -102,7 +102,7 @@ ChangeAcl(char *relname,
102102
* Find the pg_class tuple matching 'relname' and extract the ACL. If
103103
* there's no ACL, create a default using the pg_class.relowner field.
104104
*
105-
* We can't use the syscache here, since we need to do a heap_replace on
105+
* We can't use the syscache here, since we need to do a heap_update on
106106
* the tuple we find.
107107
*/
108108
relation = heap_openr(RelationRelationName, RowExclusiveLock);
@@ -151,7 +151,7 @@ ChangeAcl(char *relname,
151151
tuple = heap_modifytuple(tuple, relation, values, nulls, replaces);
152152
/* XXX handle index on pg_class? */
153153
setheapoverride(true);
154-
heap_replace(relation, &tuple->t_self, tuple, NULL);
154+
heap_update(relation, &tuple->t_self, tuple, NULL);
155155
setheapoverride(false);
156156

157157
/* keep the catalog indices up to date */

src/backend/catalog/heap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.109 1999/11/22 17:55:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.110 1999/11/24 00:44:29 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -1763,7 +1763,7 @@ StoreAttrDefault(Relation rel, AttrNumber attnum, char *adbin,
17631763
if (! attStruct->atthasdef)
17641764
{
17651765
attStruct->atthasdef = true;
1766-
heap_replace(attrrel, &atttup->t_self, atttup, NULL);
1766+
heap_update(attrrel, &atttup->t_self, atttup, NULL);
17671767
/* keep catalog indices current */
17681768
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices,
17691769
attridescs);
@@ -2085,7 +2085,7 @@ AddRelationRawConstraints(Relation rel,
20852085

20862086
relStruct->relchecks = numchecks;
20872087

2088-
heap_replace(relrel, &reltup->t_self, reltup, NULL);
2088+
heap_update(relrel, &reltup->t_self, reltup, NULL);
20892089

20902090
/* keep catalog indices current */
20912091
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices,

src/backend/catalog/index.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.97 1999/11/22 17:55:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.98 1999/11/24 00:44:29 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -839,7 +839,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
839839

840840
newtup = heap_modifytuple(tuple, pg_index, values, nulls, replace);
841841

842-
heap_replace(pg_index, &newtup->t_self, newtup, NULL);
842+
heap_update(pg_index, &newtup->t_self, newtup, NULL);
843843

844844
pfree(newtup);
845845
heap_close(pg_index, RowExclusiveLock);
@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
14291429
values[Anum_pg_class_relhasindex - 1] = CharGetDatum(hasindex);
14301430

14311431
newtup = heap_modifytuple(tuple, pg_class, values, nulls, replace);
1432-
heap_replace(pg_class, &tuple->t_self, newtup, NULL);
1432+
heap_update(pg_class, &tuple->t_self, newtup, NULL);
14331433
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs);
14341434
CatalogIndexInsert(idescs, Num_pg_class_indices, pg_class, newtup);
14351435
CatalogCloseIndices(Num_pg_class_indices, idescs);

src/backend/catalog/pg_operator.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.43 1999/11/22 17:55:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.44 1999/11/24 00:44:29 momjian Exp $
1111
*
1212
* NOTES
1313
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -791,7 +791,7 @@ OperatorDef(char *operatorName,
791791
replaces);
792792

793793
setheapoverride(true);
794-
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
794+
heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
795795
setheapoverride(false);
796796
}
797797
else
@@ -921,7 +921,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
921921
replaces);
922922

923923
setheapoverride(true);
924-
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
924+
heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
925925
setheapoverride(false);
926926

927927
if (RelationGetForm(pg_operator_desc)->relhasindex)
@@ -955,7 +955,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
955955
replaces);
956956

957957
setheapoverride(true);
958-
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
958+
heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
959959
setheapoverride(false);
960960

961961
if (RelationGetForm(pg_operator_desc)->relhasindex)
@@ -995,7 +995,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
995995
replaces);
996996

997997
setheapoverride(true);
998-
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
998+
heap_update(pg_operator_desc, &tup->t_self, tup, NULL);
999999
setheapoverride(false);
10001000

10011001
if (RelationGetForm(pg_operator_desc)->relhasindex)

src/backend/catalog/pg_type.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.42 1999/11/22 17:55:58 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.43 1999/11/24 00:44:29 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -482,7 +482,7 @@ TypeCreate(char *typeName,
482482
replaces);
483483

484484
setheapoverride(true);
485-
heap_replace(pg_type_desc, &tup->t_self, tup, NULL);
485+
heap_update(pg_type_desc, &tup->t_self, tup, NULL);
486486
setheapoverride(false);
487487

488488
typeObjectId = tup->t_data->t_oid;
@@ -559,7 +559,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
559559
namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
560560

561561
setheapoverride(true);
562-
heap_replace(pg_type_desc, &oldtup->t_self, oldtup, NULL);
562+
heap_update(pg_type_desc, &oldtup->t_self, oldtup, NULL);
563563
setheapoverride(false);
564564

565565
/* update the system catalog indices */

src/backend/commands/async.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 1994, Regents of the University of California
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.55 1999/11/22 17:55:59 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.56 1999/11/24 00:44:29 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -509,7 +509,7 @@ AtCommit_Notify()
509509
{
510510
rTuple = heap_modifytuple(lTuple, lRel,
511511
value, nulls, repl);
512-
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
512+
heap_update(lRel, &lTuple->t_self, rTuple, NULL);
513513
if (RelationGetForm(lRel)->relhasindex)
514514
{
515515
Relation idescs[Num_pg_listener_indices];
@@ -775,7 +775,7 @@ ProcessIncomingNotify(void)
775775
NotifyMyFrontEnd(relname, sourcePID);
776776
/* Rewrite the tuple with 0 in notification column */
777777
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
778-
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
778+
heap_update(lRel, &lTuple->t_self, rTuple, NULL);
779779
if (RelationGetForm(lRel)->relhasindex)
780780
{
781781
Relation idescs[Num_pg_listener_indices];

src/backend/commands/command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.57 1999/11/22 17:56:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.58 1999/11/24 00:44:30 momjian Exp $
1111
*
1212
* NOTES
1313
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -474,7 +474,7 @@ PerformAddAttribute(char *relationName,
474474
heap_close(attrdesc, RowExclusiveLock);
475475

476476
((Form_pg_class) GETSTRUCT(reltup))->relnatts = maxatts;
477-
heap_replace(rel, &reltup->t_self, reltup, NULL);
477+
heap_update(rel, &reltup->t_self, reltup, NULL);
478478

479479
/* keep catalog indices current */
480480
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, ridescs);

src/backend/commands/comment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ void CreateComments(Oid oid, char *comment) {
157157

158158
if (HeapTupleIsValid(searchtuple)) {
159159

160-
/*** If the comment is blank, call heap_delete, else heap_replace ***/
160+
/*** If the comment is blank, call heap_delete, else heap_update ***/
161161

162162
if ((comment == NULL) || (strlen(comment) == 0)) {
163163
heap_delete(description, &searchtuple->t_self, NULL);
164164
} else {
165165
desctuple = heap_modifytuple(searchtuple, description, values,
166166
nulls, replaces);
167167
setheapoverride(true);
168-
heap_replace(description, &searchtuple->t_self, desctuple, NULL);
168+
heap_update(description, &searchtuple->t_self, desctuple, NULL);
169169
setheapoverride(false);
170170
modified = TRUE;
171171
}

src/backend/commands/rename.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.35 1999/11/07 23:08:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.36 1999/11/24 00:44:30 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -156,7 +156,7 @@ renameatt(char *relname,
156156
StrNCpy(NameStr(((Form_pg_attribute) GETSTRUCT(oldatttup))->attname),
157157
newattname, NAMEDATALEN);
158158

159-
heap_replace(attrelation, &oldatttup->t_self, oldatttup, NULL);
159+
heap_update(attrelation, &oldatttup->t_self, oldatttup, NULL);
160160

161161
/* keep system catalog indices current */
162162
CatalogOpenIndices(Num_pg_attr_indices, Name_pg_attr_indices, irelations);
@@ -291,7 +291,7 @@ renamerel(char *oldrelname, char *newrelname)
291291
StrNCpy(NameStr(((Form_pg_class) GETSTRUCT(oldreltup))->relname),
292292
newrelname, NAMEDATALEN);
293293

294-
heap_replace(relrelation, &oldreltup->t_self, oldreltup, NULL);
294+
heap_update(relrelation, &oldreltup->t_self, oldreltup, NULL);
295295

296296
/* keep the system catalog indices current */
297297
CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, irelations);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy