mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Don't generate fake "*TLOCRN*" or "*TROCRN*" aliases, either.
This is just like the previous two commits, except that this fix actually doesn't change any regression test outputs. Author: Robert Haas <rhaas@postgresql.org> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CA+TgmoYSYmDA2GvanzPMci084n+mVucv0bJ0HPbs6uhmMN6HMg@mail.gmail.com
This commit is contained in:
@@ -282,8 +282,8 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
|
|||||||
|
|
||||||
newrte = makeNode(RangeTblEntry);
|
newrte = makeNode(RangeTblEntry);
|
||||||
newrte->rtekind = RTE_SUBQUERY;
|
newrte->rtekind = RTE_SUBQUERY;
|
||||||
newrte->alias = makeAlias("*TLOCRN*", cte->ctecolnames);
|
newrte->alias = NULL;
|
||||||
newrte->eref = newrte->alias;
|
newrte->eref = makeAlias("*TLOCRN*", cte->ctecolnames);
|
||||||
newsubquery = copyObject(rte1->subquery);
|
newsubquery = copyObject(rte1->subquery);
|
||||||
IncrementVarSublevelsUp((Node *) newsubquery, 1, 1);
|
IncrementVarSublevelsUp((Node *) newsubquery, 1, 1);
|
||||||
newrte->subquery = newsubquery;
|
newrte->subquery = newsubquery;
|
||||||
@@ -379,8 +379,8 @@ rewriteSearchAndCycle(CommonTableExpr *cte)
|
|||||||
ewcl = lappend(ewcl, makeString(cte->cycle_clause->cycle_mark_column));
|
ewcl = lappend(ewcl, makeString(cte->cycle_clause->cycle_mark_column));
|
||||||
ewcl = lappend(ewcl, makeString(cte->cycle_clause->cycle_path_column));
|
ewcl = lappend(ewcl, makeString(cte->cycle_clause->cycle_path_column));
|
||||||
}
|
}
|
||||||
newrte->alias = makeAlias("*TROCRN*", ewcl);
|
newrte->alias = NULL;
|
||||||
newrte->eref = newrte->alias;
|
newrte->eref = makeAlias("*TROCRN*", ewcl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the reference to the recursive CTE in the right UNION subquery's
|
* Find the reference to the recursive CTE in the right UNION subquery's
|
||||||
|
|||||||
Reference in New Issue
Block a user