diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-06-30 23:49:25 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-06-30 23:49:25 +0100 |
commit | a1637caee9c77e30aaf4afb5c51e15cb67c4f3e3 (patch) | |
tree | a5f32a848914bc758dbf7f29dea753b0df9923cc /src/backend/utils/adt/arrayfuncs.c | |
parent | 69da8c1e69efd3a5b1b0f1d9bd8b7b79a696fbc8 (diff) |
Repair logic for reordering grouping sets optimization.
The logic in reorder_grouping_sets to order grouping set elements to
match a pre-specified sort ordering was defective, resulting in
unnecessary sort nodes (though the query output would still be
correct). Repair, simplifying the code a little, and add a test.
Per report from Richard Guo, though I didn't use their patch. Original
bug seems to have been my fault.
Backpatch back to 9.5 where grouping sets were introduced.
Discussion: https://postgr.es/m/CAN_9JTzyjGcUjiBHxLsgqfk7PkdLGXiM=pwM+=ph2LsWw0WO1A@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
0 files changed, 0 insertions, 0 deletions