1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Replace uses of heap_open et al with the corresponding table_* function.

Author: Andres Freund
Discussion: https://postgr.es/m/20190111000539.xbv7s6w7ilcvm7dp@alap3.anarazel.de
This commit is contained in:
Andres Freund
2019-01-21 10:32:19 -08:00
parent 111944c5ee
commit e0c4ec0728
114 changed files with 1259 additions and 1259 deletions

View File

@ -335,7 +335,7 @@ create_proc_lang(const char *languageName, bool replace,
ObjectAddress myself,
referenced;
rel = heap_open(LanguageRelationId, RowExclusiveLock);
rel = table_open(LanguageRelationId, RowExclusiveLock);
tupDesc = RelationGetDescr(rel);
/* Prepare data to be inserted */
@ -444,7 +444,7 @@ create_proc_lang(const char *languageName, bool replace,
/* Post creation hook for new procedural language */
InvokeObjectPostCreateHook(LanguageRelationId, myself.objectId, 0);
heap_close(rel, RowExclusiveLock);
table_close(rel, RowExclusiveLock);
return myself;
}
@ -461,7 +461,7 @@ find_language_template(const char *languageName)
ScanKeyData key;
HeapTuple tup;
rel = heap_open(PLTemplateRelationId, AccessShareLock);
rel = table_open(PLTemplateRelationId, AccessShareLock);
ScanKeyInit(&key,
Anum_pg_pltemplate_tmplname,
@ -511,7 +511,7 @@ find_language_template(const char *languageName)
systable_endscan(scan);
heap_close(rel, AccessShareLock);
table_close(rel, AccessShareLock);
return result;
}
@ -535,7 +535,7 @@ DropProceduralLanguageById(Oid langOid)
Relation rel;
HeapTuple langTup;
rel = heap_open(LanguageRelationId, RowExclusiveLock);
rel = table_open(LanguageRelationId, RowExclusiveLock);
langTup = SearchSysCache1(LANGOID, ObjectIdGetDatum(langOid));
if (!HeapTupleIsValid(langTup)) /* should not happen */
@ -545,7 +545,7 @@ DropProceduralLanguageById(Oid langOid)
ReleaseSysCache(langTup);
heap_close(rel, RowExclusiveLock);
table_close(rel, RowExclusiveLock);
}
/*