aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-12-07 17:41:45 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-12-07 17:42:11 -0500
commit7e19db0c09719d7919a8fdd96a1fffe7efd2df93 (patch)
treee5399ad43e903db127e803c8f32e9040afea1775 /contrib/postgres_fdw/postgres_fdw.c
parent9821492ee417a5910a60f3d1f2ed24c062eab4e0 (diff)
downloadpostgresql-7e19db0c09719d7919a8fdd96a1fffe7efd2df93.tar.gz
postgresql-7e19db0c09719d7919a8fdd96a1fffe7efd2df93.zip
Fix another oversight in checking if a join with LATERAL refs is legal.
It was possible for the planner to decide to join a LATERAL subquery to the outer side of an outer join before the outer join itself is completed. Normally that's fine because of the associativity rules, but it doesn't work if the subquery contains a lateral reference to the inner side of the outer join. In such a situation the outer join *must* be done first. join_is_legal() missed this consideration and would allow the join to be attempted, but the actual path-building code correctly decided that no valid join path could be made, sometimes leading to planner errors such as "failed to build any N-way joins". Per report from Andreas Seltenreich. Back-patch to 9.3 where LATERAL support was added.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions