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:
@ -852,7 +852,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
|
||||
Assert(!stmt->query);
|
||||
|
||||
/* Open and lock the relation, using the appropriate lock type. */
|
||||
rel = heap_openrv(stmt->relation, lockmode);
|
||||
rel = table_openrv(stmt->relation, lockmode);
|
||||
|
||||
relid = RelationGetRelid(rel);
|
||||
|
||||
@ -1000,7 +1000,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
|
||||
*
|
||||
* We'll reopen it later as part of the query-based COPY.
|
||||
*/
|
||||
heap_close(rel, NoLock);
|
||||
table_close(rel, NoLock);
|
||||
rel = NULL;
|
||||
}
|
||||
}
|
||||
@ -1047,7 +1047,7 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
|
||||
* ensure that updates will be committed before lock is released.
|
||||
*/
|
||||
if (rel != NULL)
|
||||
heap_close(rel, (is_from ? NoLock : AccessShareLock));
|
||||
table_close(rel, (is_from ? NoLock : AccessShareLock));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user