mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Use l*_node() family of functions where appropriate
Instead of castNode(…, lfoo(…)) Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/87eecahraj.fsf@wibble.ilmari.org
This commit is contained in:
@ -307,8 +307,8 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
|
||||
list_nth_oid(cte->ctecolcollations, i),
|
||||
0);
|
||||
tle = makeTargetEntry((Expr *) var, i + 1, strVal(list_nth(cte->ctecolnames, i)), false);
|
||||
tle->resorigtbl = castNode(TargetEntry, list_nth(rte1->subquery->targetList, i))->resorigtbl;
|
||||
tle->resorigcol = castNode(TargetEntry, list_nth(rte1->subquery->targetList, i))->resorigcol;
|
||||
tle->resorigtbl = list_nth_node(TargetEntry, rte1->subquery->targetList, i)->resorigtbl;
|
||||
tle->resorigcol = list_nth_node(TargetEntry, rte1->subquery->targetList, i)->resorigcol;
|
||||
newq1->targetList = lappend(newq1->targetList, tle);
|
||||
}
|
||||
|
||||
@ -482,8 +482,8 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
|
||||
list_nth_oid(cte->ctecolcollations, i),
|
||||
0);
|
||||
tle = makeTargetEntry((Expr *) var, i + 1, strVal(list_nth(cte->ctecolnames, i)), false);
|
||||
tle->resorigtbl = castNode(TargetEntry, list_nth(rte2->subquery->targetList, i))->resorigtbl;
|
||||
tle->resorigcol = castNode(TargetEntry, list_nth(rte2->subquery->targetList, i))->resorigcol;
|
||||
tle->resorigtbl = list_nth_node(TargetEntry, rte2->subquery->targetList, i)->resorigtbl;
|
||||
tle->resorigcol = list_nth_node(TargetEntry, rte2->subquery->targetList, i)->resorigcol;
|
||||
newq2->targetList = lappend(newq2->targetList, tle);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user