mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Rethink representation of PathTargets.
In commit 19a541143a
I did not make PathTarget a subtype of Node,
and embedded a RelOptInfo's reltarget directly into it rather than having
a separately-allocated Node. In hindsight that was misguided
micro-optimization, enabled by the fact that at that point we didn't have
any Paths with custom PathTargets. Now that PathTarget processing has
been fleshed out some more, it's easier to see that it's better to have
PathTarget as an indepedent Node type, even if it does cost us one more
palloc to create a RelOptInfo. So change it while we still can.
This commit just changes the representation, without doing anything more
interesting than that.
This commit is contained in:
@ -728,10 +728,10 @@ build_tlist_to_deparse(RelOptInfo *foreignrel)
|
||||
PgFdwRelationInfo *fpinfo = (PgFdwRelationInfo *) foreignrel->fdw_private;
|
||||
|
||||
/*
|
||||
* We require columns specified in foreignrel->reltarget.exprs and those
|
||||
* We require columns specified in foreignrel->reltarget->exprs and those
|
||||
* required for evaluating the local conditions.
|
||||
*/
|
||||
tlist = add_to_flat_tlist(tlist, foreignrel->reltarget.exprs);
|
||||
tlist = add_to_flat_tlist(tlist, foreignrel->reltarget->exprs);
|
||||
tlist = add_to_flat_tlist(tlist,
|
||||
pull_var_clause((Node *) fpinfo->local_conds,
|
||||
PVC_RECURSE_PLACEHOLDERS));
|
||||
|
Reference in New Issue
Block a user