@@ -67,7 +67,7 @@ sepgsql_attribute_post_create(Oid relOid, AttrNumber attnum)
67
67
* Compute a default security label of the new column underlying the
68
68
* specified relation, and check permission to create it.
69
69
*/
70
- rel = heap_open (AttributeRelationId , AccessShareLock );
70
+ rel = table_open (AttributeRelationId , AccessShareLock );
71
71
72
72
ScanKeyInit (& skey [0 ],
73
73
Anum_pg_attribute_attrelid ,
@@ -120,7 +120,7 @@ sepgsql_attribute_post_create(Oid relOid, AttrNumber attnum)
120
120
SetSecurityLabel (& object , SEPGSQL_LABEL_TAG , ncontext );
121
121
122
122
systable_endscan (sscan );
123
- heap_close (rel , AccessShareLock );
123
+ table_close (rel , AccessShareLock );
124
124
125
125
pfree (tcontext );
126
126
pfree (ncontext );
@@ -259,7 +259,7 @@ sepgsql_relation_post_create(Oid relOid)
259
259
* Fetch catalog record of the new relation. Because pg_class entry is not
260
260
* visible right now, we need to scan the catalog using SnapshotSelf.
261
261
*/
262
- rel = heap_open (RelationRelationId , AccessShareLock );
262
+ rel = table_open (RelationRelationId , AccessShareLock );
263
263
264
264
ScanKeyInit (& skey ,
265
265
Anum_pg_class_oid ,
@@ -358,7 +358,7 @@ sepgsql_relation_post_create(Oid relOid)
358
358
HeapTuple atup ;
359
359
Form_pg_attribute attForm ;
360
360
361
- arel = heap_open (AttributeRelationId , AccessShareLock );
361
+ arel = table_open (AttributeRelationId , AccessShareLock );
362
362
363
363
ScanKeyInit (& akey ,
364
364
Anum_pg_attribute_attrelid ,
@@ -400,13 +400,13 @@ sepgsql_relation_post_create(Oid relOid)
400
400
pfree (ccontext );
401
401
}
402
402
systable_endscan (ascan );
403
- heap_close (arel , AccessShareLock );
403
+ table_close (arel , AccessShareLock );
404
404
}
405
405
pfree (rcontext );
406
406
407
407
out :
408
408
systable_endscan (sscan );
409
- heap_close (rel , AccessShareLock );
409
+ table_close (rel , AccessShareLock );
410
410
}
411
411
412
412
/*
@@ -611,7 +611,7 @@ sepgsql_relation_setattr(Oid relOid)
611
611
/*
612
612
* Fetch newer catalog
613
613
*/
614
- rel = heap_open (RelationRelationId , AccessShareLock );
614
+ rel = table_open (RelationRelationId , AccessShareLock );
615
615
616
616
ScanKeyInit (& skey ,
617
617
Anum_pg_class_oid ,
@@ -667,7 +667,7 @@ sepgsql_relation_setattr(Oid relOid)
667
667
668
668
ReleaseSysCache (oldtup );
669
669
systable_endscan (sscan );
670
- heap_close (rel , AccessShareLock );
670
+ table_close (rel , AccessShareLock );
671
671
}
672
672
673
673
/*
@@ -723,13 +723,13 @@ sepgsql_relation_setattr_extra(Relation catalog,
723
723
static void
724
724
sepgsql_index_modify (Oid indexOid )
725
725
{
726
- Relation catalog = heap_open (IndexRelationId , AccessShareLock );
726
+ Relation catalog = table_open (IndexRelationId , AccessShareLock );
727
727
728
728
/* check db_table:{setattr} permission of the table being indexed */
729
729
sepgsql_relation_setattr_extra (catalog ,
730
730
IndexRelidIndexId ,
731
731
indexOid ,
732
732
Anum_pg_index_indrelid ,
733
733
Anum_pg_index_indexrelid );
734
- heap_close (catalog , AccessShareLock );
734
+ table_close (catalog , AccessShareLock );
735
735
}
0 commit comments