1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Fix LATERAL references to join alias variables.

I had thought this case worked already, but perhaps I didn't re-test it
after adding extract_lateral_references() ...
This commit is contained in:
Tom Lane
2012-08-31 17:44:01 -04:00
parent f789909b59
commit da3df99870
4 changed files with 78 additions and 19 deletions

View File

@ -600,7 +600,9 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context)
* hasSubLinks = TRUE, so this is only relevant to un-flattened subqueries.
*
* NOTE: this is used on not-yet-planned expressions. We do not expect it
* to be applied directly to a Query node.
* to be applied directly to the whole Query, so if we see a Query to start
* with, we do want to increment sublevels_up (this occurs for LATERAL
* subqueries).
*/
Node *
flatten_join_alias_vars(PlannerInfo *root, Node *node)