select_into_fix

Offering: openGaussDev

More detail: fix the lost of targetlist data

Match-id-18da7d885125b5bbd6c1cbe3b1588751ca89f554
This commit is contained in:
yanghao
2023-03-13 22:13:02 +08:00
parent 415a621a1e
commit 7be67ae4b0
12 changed files with 101 additions and 82 deletions

View File

@ -2134,13 +2134,6 @@ static Node* transformSelectIntoVarList(ParseState* pstate, SelectIntoVarList* s
ereport(ERROR, (errcode(ERRCODE_INVALID_OPERATION), errmsg("unexpected non-SELECT command in SubLink")));
}
sublink->subselect = (Node*)qtree;
if (list_length(qtree->targetList) != list_length(sis->userVarList)) {
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("number of variables must equal the number of columns"),
parser_errposition(pstate, sublink->location)));
}
return (Node *)sis;
}