summaryrefslogtreecommitdiff
path: root/src/backend/commands/seclabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/seclabel.c')
-rw-r--r--src/backend/commands/seclabel.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.c
index 324f2e7bd9e..506c90f6e25 100644
--- a/src/backend/commands/seclabel.c
+++ b/src/backend/commands/seclabel.c
@@ -299,7 +299,7 @@ SetSharedSecurityLabel(const ObjectAddress *object,
replaces[Anum_pg_shseclabel_label - 1] = true;
newtup = heap_modify_tuple(oldtup, RelationGetDescr(pg_shseclabel),
values, nulls, replaces);
- simple_heap_update(pg_shseclabel, &oldtup->t_self, newtup);
+ CatalogTupleUpdate(pg_shseclabel, &oldtup->t_self, newtup);
}
}
systable_endscan(scan);
@@ -309,15 +309,11 @@ SetSharedSecurityLabel(const ObjectAddress *object,
{
newtup = heap_form_tuple(RelationGetDescr(pg_shseclabel),
values, nulls);
- simple_heap_insert(pg_shseclabel, newtup);
+ CatalogTupleInsert(pg_shseclabel, newtup);
}
- /* Update indexes, if necessary */
if (newtup != NULL)
- {
- CatalogUpdateIndexes(pg_shseclabel, newtup);
heap_freetuple(newtup);
- }
heap_close(pg_shseclabel, RowExclusiveLock);
}
@@ -390,7 +386,7 @@ SetSecurityLabel(const ObjectAddress *object,
replaces[Anum_pg_seclabel_label - 1] = true;
newtup = heap_modify_tuple(oldtup, RelationGetDescr(pg_seclabel),
values, nulls, replaces);
- simple_heap_update(pg_seclabel, &oldtup->t_self, newtup);
+ CatalogTupleUpdate(pg_seclabel, &oldtup->t_self, newtup);
}
}
systable_endscan(scan);
@@ -400,15 +396,12 @@ SetSecurityLabel(const ObjectAddress *object,
{
newtup = heap_form_tuple(RelationGetDescr(pg_seclabel),
values, nulls);
- simple_heap_insert(pg_seclabel, newtup);
+ CatalogTupleInsert(pg_seclabel, newtup);
}
/* Update indexes, if necessary */
if (newtup != NULL)
- {
- CatalogUpdateIndexes(pg_seclabel, newtup);
heap_freetuple(newtup);
- }
heap_close(pg_seclabel, RowExclusiveLock);
}