Readds deleted resultRelInfo changes for previos PG versions

These changes were removed in commit: Introduces ExecSimpleRelationInsert_compat and modifyStateResultRelInfo macros
We shouldn't have removed them but instead kept them for before PG14
pull/5209/head
Halil Ozan Akgul 2021-08-20 20:17:33 +03:00 committed by Sait Talha Nisanci
parent b632dd9940
commit 9fc4c27b08
1 changed files with 9 additions and 0 deletions

View File

@ -1415,6 +1415,15 @@ create_estate_for_relation(Relation rel)
rte->rellockmode = AccessShareLock;
ExecInitRangeTable(estate, list_make1(rte));
#if PG_VERSION_NUM < PG_VERSION_14
ResultRelInfo *resultRelInfo = makeNode(ResultRelInfo);
InitResultRelInfo(resultRelInfo, rel, 1, NULL, 0);
estate->es_result_relations = resultRelInfo;
estate->es_num_result_relations = 1;
estate->es_result_relation_info = resultRelInfo;
#endif
estate->es_output_cid = GetCurrentCommandId(true);
/* Prepare to catch AFTER triggers. */