1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Add a reverse-translation column number array to struct AppendRelInfo.

This provides for cheaper mapping of child columns back to parent
columns.  The one existing use-case in examine_simple_variable()
would hardly justify this by itself; but an upcoming bug fix will
make use of this array in a mainstream code path, and it seems
likely that we'll find other uses for it as we continue to build
out the partitioning infrastructure.

Discussion: https://postgr.es/m/12424.1575168015@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2019-12-02 18:05:29 -05:00
parent 4526951d56
commit ce76c0ba53
8 changed files with 61 additions and 39 deletions

View File

@ -3103,6 +3103,7 @@ expression_tree_mutator(Node *node,
FLATCOPY(newnode, appinfo, AppendRelInfo);
MUTATE(newnode->translated_vars, appinfo->translated_vars, List *);
/* Assume nothing need be done with parent_colnos[] */
return (Node *) newnode;
}
break;