aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2019-01-21 10:32:19 -0800
committerAndres Freund <andres@anarazel.de>2019-01-21 10:51:37 -0800
commite0c4ec07284db817e1f8d9adfb3fffc952252db0 (patch)
treead56d635b246f6d4d0d7a17b2a4ac797d7227b62 /src/backend/parser/parse_utilcmd.c
parent111944c5ee567f1c45bf0f1ecfdec682af467aa6 (diff)
downloadpostgresql-e0c4ec07284db817e1f8d9adfb3fffc952252db0.tar.gz
postgresql-e0c4ec07284db817e1f8d9adfb3fffc952252db0.zip
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
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index ef3865d8ee7..404569f7df4 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1200,7 +1200,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
* commit. That will prevent someone else from deleting or ALTERing the
* parent before the child is committed.
*/
- heap_close(relation, NoLock);
+ table_close(relation, NoLock);
}
static void
@@ -2157,7 +2157,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
Relation rel;
int count;
- rel = heap_openrv(inh, AccessShareLock);
+ rel = table_openrv(inh, AccessShareLock);
/* check user requested inheritance from valid relkind */
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_FOREIGN_TABLE &&
@@ -2187,7 +2187,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
break;
}
}
- heap_close(rel, NoLock);
+ table_close(rel, NoLock);
if (found)
break;
}
@@ -2280,7 +2280,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
Relation rel;
int count;
- rel = heap_openrv(inh, AccessShareLock);
+ rel = table_openrv(inh, AccessShareLock);
/* check user requested inheritance from valid relkind */
if (rel->rd_rel->relkind != RELKIND_RELATION &&
rel->rd_rel->relkind != RELKIND_FOREIGN_TABLE &&
@@ -2310,7 +2310,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt)
break;
}
}
- heap_close(rel, NoLock);
+ table_close(rel, NoLock);
if (found)
break;
}
@@ -2550,7 +2550,7 @@ transformIndexStmt(Oid relid, IndexStmt *stmt, const char *queryString)
free_parsestate(pstate);
/* Close relation */
- heap_close(rel, NoLock);
+ table_close(rel, NoLock);
/* Mark statement as successfully transformed */
stmt->transformed = true;
@@ -2586,7 +2586,7 @@ transformRuleStmt(RuleStmt *stmt, const char *queryString,
* DefineQueryRewrite(), and we don't want to grab a lesser lock
* beforehand.
*/
- rel = heap_openrv(stmt->relation, AccessExclusiveLock);
+ rel = table_openrv(stmt->relation, AccessExclusiveLock);
if (rel->rd_rel->relkind == RELKIND_MATVIEW)
ereport(ERROR,
@@ -2864,7 +2864,7 @@ transformRuleStmt(RuleStmt *stmt, const char *queryString,
free_parsestate(pstate);
/* Close relation, but keep the exclusive lock */
- heap_close(rel, NoLock);
+ table_close(rel, NoLock);
}