diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-06-30 23:49:31 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-06-30 23:49:31 +0100 |
commit | 4a36c77156f2ff6e07a349cddc65e5dd21abc1a8 (patch) | |
tree | 95f30e933f42ae073a868bcbeccb92d7cf17a0a2 /src/backend/access/gist/gistbuildbuffers.c | |
parent | d7395cf608e7ec8c9cebd17c19dc5d07c761010e (diff) | |
download | postgresql-4a36c77156f2ff6e07a349cddc65e5dd21abc1a8.tar.gz postgresql-4a36c77156f2ff6e07a349cddc65e5dd21abc1a8.zip |
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/access/gist/gistbuildbuffers.c')
0 files changed, 0 insertions, 0 deletions