1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +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

@ -2584,10 +2584,10 @@ table_to_xmlschema(PG_FUNCTION_ARGS)
const char *result;
Relation rel;
rel = heap_open(relid, AccessShareLock);
rel = table_open(relid, AccessShareLock);
result = map_sql_table_to_xmlschema(rel->rd_att, relid, nulls,
tableforest, targetns);
heap_close(rel, NoLock);
table_close(rel, NoLock);
PG_RETURN_XML_P(cstring_to_xmltype(result));
}
@ -2658,10 +2658,10 @@ table_to_xml_and_xmlschema(PG_FUNCTION_ARGS)
Relation rel;
const char *xmlschema;
rel = heap_open(relid, AccessShareLock);
rel = table_open(relid, AccessShareLock);
xmlschema = map_sql_table_to_xmlschema(rel->rd_att, relid, nulls,
tableforest, targetns);
heap_close(rel, NoLock);
table_close(rel, NoLock);
PG_RETURN_XML_P(stringinfo_to_xmltype(table_to_xml_internal(relid,
xmlschema, nulls, tableforest,
@ -2819,9 +2819,9 @@ schema_to_xmlschema_internal(const char *schemaname, bool nulls,
{
Relation rel;
rel = heap_open(lfirst_oid(cell), AccessShareLock);
rel = table_open(lfirst_oid(cell), AccessShareLock);
tupdesc_list = lappend(tupdesc_list, CreateTupleDescCopy(rel->rd_att));
heap_close(rel, NoLock);
table_close(rel, NoLock);
}
appendStringInfoString(result,
@ -2959,9 +2959,9 @@ database_to_xmlschema_internal(bool nulls, bool tableforest,
{
Relation rel;
rel = heap_open(lfirst_oid(cell), AccessShareLock);
rel = table_open(lfirst_oid(cell), AccessShareLock);
tupdesc_list = lappend(tupdesc_list, CreateTupleDescCopy(rel->rd_att));
heap_close(rel, NoLock);
table_close(rel, NoLock);
}
appendStringInfoString(result,