Fix generate_union_paths for non-sortable types.

Robert Haas <rhaas@postgresql.org>

Commit: c37267162e889fe783786b9e28d1b65b82365a00
Author: Robert Haas <rhaas@postgresql.org>
Date: 2024-05-21T16:54:09Z
Releases: 17.0
Fix generate_union_paths for non-sortable types.

The previous logic would fail to set groupList when
grouping_is_sortable() returned false, which could cause queries
to return wrong answers when some columns were not sortable.

David Rowley, reviewed by Heikki Linnakangas and Álvaro Herrera.
Reported by Hubert "depesz" Lubaczewski.

Discussion: http://postgr.es/m/Zktzf926vslR35Fv@depesz.com
Discussion: http://postgr.es/m/CAApHDvra=c8_zZT0J-TftByWN2Y+OJfnjNJFg4Dfdi2s+QzmqA@mail.gmail.com

Files

Discussion