summaryrefslogtreecommitdiff
path: root/src/backend/commands/tsearchcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tsearchcmds.c')
-rw-r--r--src/backend/commands/tsearchcmds.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c
index 479a160815b..988930b1c55 100644
--- a/src/backend/commands/tsearchcmds.c
+++ b/src/backend/commands/tsearchcmds.c
@@ -271,9 +271,7 @@ DefineTSParser(List *names, List *parameters)
tup = heap_form_tuple(prsRel->rd_att, values, nulls);
- prsOid = simple_heap_insert(prsRel, tup);
-
- CatalogUpdateIndexes(prsRel, tup);
+ prsOid = CatalogTupleInsert(prsRel, tup);
address = makeParserDependencies(tup);
@@ -482,9 +480,7 @@ DefineTSDictionary(List *names, List *parameters)
tup = heap_form_tuple(dictRel->rd_att, values, nulls);
- dictOid = simple_heap_insert(dictRel, tup);
-
- CatalogUpdateIndexes(dictRel, tup);
+ dictOid = CatalogTupleInsert(dictRel, tup);
address = makeDictionaryDependencies(tup);
@@ -620,9 +616,7 @@ AlterTSDictionary(AlterTSDictionaryStmt *stmt)
newtup = heap_modify_tuple(tup, RelationGetDescr(rel),
repl_val, repl_null, repl_repl);
- simple_heap_update(rel, &newtup->t_self, newtup);
-
- CatalogUpdateIndexes(rel, newtup);
+ CatalogTupleUpdate(rel, &newtup->t_self, newtup);
InvokeObjectPostAlterHook(TSDictionaryRelationId, dictId, 0);
@@ -806,9 +800,7 @@ DefineTSTemplate(List *names, List *parameters)
tup = heap_form_tuple(tmplRel->rd_att, values, nulls);
- tmplOid = simple_heap_insert(tmplRel, tup);
-
- CatalogUpdateIndexes(tmplRel, tup);
+ tmplOid = CatalogTupleInsert(tmplRel, tup);
address = makeTSTemplateDependencies(tup);
@@ -1066,9 +1058,7 @@ DefineTSConfiguration(List *names, List *parameters, ObjectAddress *copied)
tup = heap_form_tuple(cfgRel->rd_att, values, nulls);
- cfgOid = simple_heap_insert(cfgRel, tup);
-
- CatalogUpdateIndexes(cfgRel, tup);
+ cfgOid = CatalogTupleInsert(cfgRel, tup);
if (OidIsValid(sourceOid))
{
@@ -1106,9 +1096,7 @@ DefineTSConfiguration(List *names, List *parameters, ObjectAddress *copied)
newmaptup = heap_form_tuple(mapRel->rd_att, mapvalues, mapnulls);
- simple_heap_insert(mapRel, newmaptup);
-
- CatalogUpdateIndexes(mapRel, newmaptup);
+ CatalogTupleInsert(mapRel, newmaptup);
heap_freetuple(newmaptup);
}
@@ -1409,9 +1397,7 @@ MakeConfigurationMapping(AlterTSConfigurationStmt *stmt,
newtup = heap_modify_tuple(maptup,
RelationGetDescr(relMap),
repl_val, repl_null, repl_repl);
- simple_heap_update(relMap, &newtup->t_self, newtup);
-
- CatalogUpdateIndexes(relMap, newtup);
+ CatalogTupleUpdate(relMap, &newtup->t_self, newtup);
}
}
@@ -1436,8 +1422,7 @@ MakeConfigurationMapping(AlterTSConfigurationStmt *stmt,
values[Anum_pg_ts_config_map_mapdict - 1] = ObjectIdGetDatum(dictIds[j]);
tup = heap_form_tuple(relMap->rd_att, values, nulls);
- simple_heap_insert(relMap, tup);
- CatalogUpdateIndexes(relMap, tup);
+ CatalogTupleInsert(relMap, tup);
heap_freetuple(tup);
}