some more

pull/7643/head
paragjain 2024-07-16 03:34:18 +00:00
parent d29e3ccbc5
commit 06bc0b47db
2 changed files with 3 additions and 3 deletions

View File

@ -857,8 +857,8 @@ ConvertRelationRTEIntoSubquery(Query *mergeQuery, RangeTblEntry *sourceRte,
/* set the FROM expression to the subquery */ /* set the FROM expression to the subquery */
newRangeTableRef->rtindex = SINGLE_RTE_INDEX; newRangeTableRef->rtindex = SINGLE_RTE_INDEX;
sourceResultsQuery->jointree = makeFromExpr(list_make1(newRangeTableRef), NULL); sourceResultsQuery->jointree = makeFromExpr(list_make1(newRangeTableRef), NULL);
sourceResultsQuery->targetList = CreateAllTargetListForRelation(sourceRte->relid, sourceResultsQuery->targetList =
requiredAttributes); CreateAllTargetListForRelation(sourceRte->relid, requiredAttributes);
List *restrictionList = List *restrictionList =
GetRestrictInfoListForRelation(sourceRte, plannerRestrictionContext); GetRestrictInfoListForRelation(sourceRte, plannerRestrictionContext);
List *copyRestrictionList = copyObject(restrictionList); List *copyRestrictionList = copyObject(restrictionList);

View File

@ -362,7 +362,7 @@ CreateAllTargetListForRelation(Oid relationId, List *requiredAttributes)
else else
{ {
TargetEntry *targetEntry = TargetEntry *targetEntry =
CreateTargetEntryForColumn(attributeTuple, SINGLE_RTE_INDEX, varAttrNo, CreateTargetEntryForColumn(attributeTuple, SINGLE_RTE_INDEX, varAttrNo++,
resNo); resNo);
targetList = lappend(targetList, targetEntry); targetList = lappend(targetList, targetEntry);
} }