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 */
newRangeTableRef->rtindex = SINGLE_RTE_INDEX;
sourceResultsQuery->jointree = makeFromExpr(list_make1(newRangeTableRef), NULL);
sourceResultsQuery->targetList = CreateAllTargetListForRelation(sourceRte->relid,
requiredAttributes);
sourceResultsQuery->targetList =
CreateAllTargetListForRelation(sourceRte->relid, requiredAttributes);
List *restrictionList =
GetRestrictInfoListForRelation(sourceRte, plannerRestrictionContext);
List *copyRestrictionList = copyObject(restrictionList);

View File

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