Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhibai Song committed Nov 10, 2023
1 parent 23f97a7 commit 402f81e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/backend/commands/functioncmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2489,6 +2489,7 @@ ExecuteCallStmt(CallStmt *stmt, ParamListInfo params, bool atomic, DestReceiver
rsinfo.isDone = ExprSingleResult;
rsinfo.setResult = NULL;
rsinfo.setDesc = NULL;
rsinfo.insertExecStmt = NULL;
}

/* Get rid of temporary snapshot for arguments, if we made one */
Expand Down
12 changes: 4 additions & 8 deletions src/backend/parser/analyze.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,21 +706,17 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
((CallStmt *) stmt->execStmt)->retdesc = NULL;
((CallStmt *) stmt->execStmt)->dest = NULL;
qry->utilityStmt = callStmtQry->utilityStmt;
oldContext = MemoryContextSwitchTo(TopMemoryContext);
((CallStmt *) stmt->execStmt)->exec_insert_icolumns = copyObject(icolumns);
((CallStmt *) stmt->execStmt)->exec_insert_stmt_cols = copyObject(stmt->cols);
MemoryContextSwitchTo(oldContext);
((CallStmt *) stmt->execStmt)->exec_insert_icolumns = icolumns;
((CallStmt *) stmt->execStmt)->exec_insert_stmt_cols = stmt->cols;
((CallStmt *) stmt->execStmt)->rd_length = list_length(pstate->p_rtable);
}
break;
case T_DoStmt:
((DoStmt *) stmt->execStmt)->relation = pstate->p_target_relation->rd_id;
((DoStmt *) stmt->execStmt)->attrnos = attrnos;
qry->utilityStmt = stmt->execStmt;
oldContext = MemoryContextSwitchTo(TopMemoryContext);
((DoStmt *) stmt->execStmt)->exec_insert_icolumns = copyObject(icolumns);
((DoStmt *) stmt->execStmt)->exec_insert_stmt_cols = copyObject(stmt->cols);
MemoryContextSwitchTo(oldContext);
((DoStmt *) stmt->execStmt)->exec_insert_icolumns = icolumns;
((DoStmt *) stmt->execStmt)->exec_insert_stmt_cols = stmt->cols;
((DoStmt *) stmt->execStmt)->rd_length = list_length(pstate->p_rtable);
break;
default:
Expand Down

0 comments on commit 402f81e

Please sign in to comment.