create_unique_plan() should not discard existing output columns of the
Tom Lane <tgl@sss.pgh.pa.us>
create_unique_plan() should not discard existing output columns of the subplan it starts with, as they may be needed at upper join levels. See comments added to code for the non-obvious reason why. Per bug report from Robert Creager.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/createplan.c | modified | +69 −32 |
| src/backend/parser/parse_clause.c | modified | +2 −5 |
| src/include/parser/parse_clause.h | modified | +4 −1 |
| src/test/regress/expected/join.out | modified | +12 −0 |
| src/test/regress/sql/join.sql | modified | +8 −0 |