else
lockmode = rte->rellockmode;
- rel = table_open(rte->relid, lockmode);
+ rel = relation_open(rte->relid, lockmode);
/*
* While we have the relation open, update the RTE's relkind,
*/
rte->relkind = rel->rd_rel->relkind;
- table_close(rel, NoLock);
+ relation_close(rel, NoLock);
break;
case RTE_JOIN:
* We can use NoLock here since either the parser or
* AcquireRewriteLocks should have locked the rel already.
*/
- rel = table_open(rte->relid, NoLock);
+ rel = relation_open(rte->relid, NoLock);
/*
* Collect the RIR rules that we must apply
rte->relkind != RELKIND_PARTITIONED_TABLE))
continue;
- rel = table_open(rte->relid, NoLock);
+ rel = relation_open(rte->relid, NoLock);
/*
* Fetch any new security quals that must be applied to this RTE.
* already have the right lock!) Since it will become the query target
* relation, RowExclusiveLock is always the right thing.
*/
- base_rel = table_open(base_rte->relid, RowExclusiveLock);
+ base_rel = relation_open(base_rte->relid, RowExclusiveLock);
/*
* While we have the relation open, update the RTE's relkind, just in case
* We can use NoLock here since either the parser or
* AcquireRewriteLocks should have locked the rel already.
*/
- rt_entry_relation = table_open(rt_entry->relid, NoLock);
+ rt_entry_relation = relation_open(rt_entry->relid, NoLock);
/*
* Rewrite the targetlist as needed for the command type.