From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix generate_union_paths for non-sortable types.
Date: Tue, 21 May 2024 17:03:22 +0000
Message-ID: <E1s9StW-001ES0-II@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c37267162e889fe783786b9e28d1b65b82365a00
Modified Files
--------------
src/backend/optimizer/prep/prepunion.c | 21 ++++++++++++---------
src/test/regress/expected/union.out | 13 +++++++++++++
src/test/regress/sql/union.sql | 6 ++++++
3 files changed, 31 insertions(+), 9 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix generate_union_paths for non-sortable types.
In-Reply-To: <E1s9StW-001ES0-II@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox