修复copy to、copy from提示错误问题

This commit is contained in:
kenxx
2023-03-09 21:01:17 -05:00
parent 82f43977a7
commit 18eecad467
2 changed files with 6 additions and 3 deletions

View File

@ -232,7 +232,10 @@ static int DecodeTextArrayToCString(Datum array, char ***cstringp)
*/
static void InvalidateEventCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
{
MemoryContextReset(u_sess->exec_cxt.EventTriggerCacheContext);
u_sess->exec_cxt.EventTriggerCache = NULL;
/*Avoid repeated cache release,especially while rebuilding evtcache*/
if (u_sess->exec_cxt.EventTriggerCache != NULL) {
MemoryContextReset(u_sess->exec_cxt.EventTriggerCacheContext);
u_sess->exec_cxt.EventTriggerCache = NULL;
}
}

View File

@ -3201,7 +3201,7 @@ void standard_ProcessUtility(processutility_context* processutility_cxt,
uint64 processed;
uint64 histhash;
bool has_histhash;
processed = DoCopy((CopyStmt*)parse_tree, query_string, &processed);
DoCopy((CopyStmt*)parse_tree, query_string, &processed);
has_histhash = ((CopyStmt*)parse_tree)->hashstate.has_histhash;
histhash = ((CopyStmt*)parse_tree)->hashstate.histhash;
if (completion_tag != NULL) {