diff options
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/parse_clause.c | 4 | ||||
| -rw-r--r-- | src/backend/parser/parse_node.c | 2 | ||||
| -rw-r--r-- | src/backend/parser/parse_relation.c | 18 | ||||
| -rw-r--r-- | src/backend/parser/parse_utilcmd.c | 16 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 2d740b5f52..8805543da7 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -201,13 +201,13 @@ setTargetTable(ParseState *pstate, RangeVar *relation, /* Close old target; this could only happen for multi-action rules */ if (pstate->p_target_relation != NULL) - heap_close(pstate->p_target_relation, NoLock); + table_close(pstate->p_target_relation, NoLock); /* * Open target rel and grab suitable lock (which we will hold till end of * transaction). * - * free_parsestate() will eventually do the corresponding heap_close(), + * free_parsestate() will eventually do the corresponding table_close(), * but *not* release the lock. */ pstate->p_target_relation = parserOpenTable(pstate, relation, diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index 0562e6ecc8..ece81697e6 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -88,7 +88,7 @@ free_parsestate(ParseState *pstate) MaxTupleAttributeNumber))); if (pstate->p_target_relation != NULL) - heap_close(pstate->p_target_relation, NoLock); + table_close(pstate->p_target_relation, NoLock); pfree(pstate); } diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 0f8175d39f..09fbb588af 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -1137,7 +1137,7 @@ chooseScalarFunctionAlias(Node *funcexpr, char *funcname, /* * Open a table during parse analysis * - * This is essentially just the same as heap_openrv(), except that it caters + * This is essentially just the same as table_openrv(), except that it caters * to some parser-specific error reporting needs, notably that it arranges * to include the RangeVar's parse location in any resulting error. * @@ -1152,7 +1152,7 @@ parserOpenTable(ParseState *pstate, const RangeVar *relation, int lockmode) ParseCallbackState pcbstate; setup_parser_errposition_callback(&pcbstate, pstate, relation->location); - rel = heap_openrv_extended(relation, lockmode, true); + rel = table_openrv_extended(relation, lockmode, true); if (rel == NULL) { if (relation->schemaname) @@ -1240,7 +1240,7 @@ addRangeTableEntry(ParseState *pstate, * so that the table can't be deleted or have its schema modified * underneath us. */ - heap_close(rel, NoLock); + table_close(rel, NoLock); /* * Set flags and access permissions. @@ -3096,7 +3096,7 @@ get_parse_rowmark(Query *qry, Index rtindex) * Returns InvalidAttrNumber if the attr doesn't exist (or is dropped). * * This should only be used if the relation is already - * heap_open()'ed. Use the cache version get_attnum() + * table_open()'ed. Use the cache version get_attnum() * for access to non-opened relations. */ int @@ -3146,7 +3146,7 @@ specialAttNum(const char *attname) * given attribute id, return name of that attribute * * This should only be used if the relation is already - * heap_open()'ed. Use the cache version get_atttype() + * table_open()'ed. Use the cache version get_atttype() * for access to non-opened relations. */ const NameData * @@ -3168,7 +3168,7 @@ attnumAttName(Relation rd, int attid) * given attribute id, return type of that attribute * * This should only be used if the relation is already - * heap_open()'ed. Use the cache version get_atttype() + * table_open()'ed. Use the cache version get_atttype() * for access to non-opened relations. */ Oid @@ -3189,7 +3189,7 @@ attnumTypeId(Relation rd, int attid) /* * given attribute id, return collation of that attribute * - * This should only be used if the relation is already heap_open()'ed. + * This should only be used if the relation is already table_open()'ed. */ Oid attnumCollationId(Relation rd, int attid) @@ -3361,10 +3361,10 @@ isQueryUsingTempRelation_walker(Node *node, void *context) if (rte->rtekind == RTE_RELATION) { - Relation rel = heap_open(rte->relid, AccessShareLock); + Relation rel = table_open(rte->relid, AccessShareLock); char relpersistence = rel->rd_rel->relpersistence; - heap_close(rel, AccessShareLock); + table_close(rel, AccessShareLock); if (relpersistence == RELPERSISTENCE_TEMP) return true; } diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index ef3865d8ee..404569f7df 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); } |
