Last week's patch for make_sort_from_pathkeys wasn't good enough: it has
Tom Lane <tgl@sss.pgh.pa.us>
Last week's patch for make_sort_from_pathkeys wasn't good enough: it has to be able to discard top-level RelabelType nodes on *both* sides of the equivalence-class-to-target-list comparison, since make_pathkey_from_sortinfo might either add or remove a RelabelType. Also fix the latter to do the removal case cleanly. Per example from Peter.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/pathkeys.c | modified | +7 −6 |
| src/backend/optimizer/plan/createplan.c | modified | +12 −15 |
| src/backend/optimizer/util/tlist.c | modified | +29 −1 |
| src/include/optimizer/tlist.h | modified | +2 −1 |