Remove redundant memory context switches in BeginCopyFrom().

This is probably a leftover from code refactoring.

Japin Li

Discussion: https://postgr.es/m/MEYP282MB16693DDABDFEC7949AC31857B6599@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
This commit is contained in:
Tom Lane 2022-01-19 12:31:15 -05:00
parent c330b75d9c
commit 89f059bdf5

View file

@ -1340,10 +1340,6 @@ BeginCopyFrom(ParseState *pstate,
cstate->whereClause = whereClause;
MemoryContextSwitchTo(oldcontext);
oldcontext = MemoryContextSwitchTo(cstate->copycontext);
/* Initialize state variables */
cstate->eol_type = EOL_UNKNOWN;
cstate->cur_relname = RelationGetRelationName(cstate->rel);