MCPcopy Create free account
hub / github.com/apache/cloudberry / CatalogTupleUpdate

Function CatalogTupleUpdate

src/backend/catalog/indexing.c:301–314  ·  view source on GitHub ↗

* CatalogTupleUpdate - do heap and indexing work for updating a catalog tuple * * Update the tuple identified by "otid", replacing it with the data in "tup". * * This is a convenience routine for the common case of updating a single * tuple in a system catalog; it updates one heap tuple, keeping indexes * current. Avoid using it for multiple tuples, since opening the indexes * and building

Source from the content-addressed store, hash-verified

299 * (Use CatalogTupleUpdateWithInfo in such cases.)
300 */
301void
302CatalogTupleUpdate(Relation heapRel, ItemPointer otid, HeapTuple tup)
303{
304 CatalogIndexState indstate;
305
306 CatalogTupleCheckConstraints(heapRel, tup);
307
308 indstate = CatalogOpenIndexes(heapRel);
309
310 simple_heap_update(heapRel, otid, tup);
311
312 CatalogIndexInsert(indstate, tup);
313 CatalogCloseIndexes(indstate);
314}
315
316/*
317 * CatalogTupleUpdateWithInfo - as above, but with caller-supplied index info

Callers 15

UpdateVisimapFunction · 0.85
UpdateStatisticsFunction · 0.85
manifest_update_internalFunction · 0.85
SetRelationRuleStatusFunction · 0.85
InsertRuleFunction · 0.85
DefineQueryRewriteFunction · 0.85
EnableDisableRuleFunction · 0.85
RenameRewriteRuleFunction · 0.85
statext_storeFunction · 0.85

Calls 5

CatalogOpenIndexesFunction · 0.85
simple_heap_updateFunction · 0.85
CatalogIndexInsertFunction · 0.85
CatalogCloseIndexesFunction · 0.85

Tested by 1

setAOFormatVersionFunction · 0.68