pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Give a good error message when we can neither hash nor sort a UN 4+ messages / 1 participants [nested] [flat]
* pgsql: Give a good error message when we can neither hash nor sort a UN @ 2026-11-19 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-19 20:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Give a good error message when we can neither hash nor sort a UNION. Prior to v17 we said ERROR: could not implement UNION DETAIL: Some of the datatypes only support hashing, while others only support sorting. but this check got lost in refactoring, leading to a much less helpful message. Put it back (in generate_union_paths). Also add a couple of comparable checks in other places that seem like they could be vulnerable to this problem, and add some test coverage. Bug: #19916 Reported-by: Robins Tharakan <tharakan@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19916-8097ca71b8aa4085@postgresql.org Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/882881ac1aa66144be11a52d4aff982baf6f30d0 Modified Files -------------- src/backend/optimizer/path/allpaths.c | 11 +++++++++++ src/backend/optimizer/plan/planner.c | 14 ++++++++++++++ src/backend/optimizer/prep/prepunion.c | 13 +++++++++++++ src/test/regress/expected/union.out | 17 +++++++++++++++++ src/test/regress/sql/union.sql | 8 ++++++++ 5 files changed, 63 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Give a good error message when we can neither hash nor sort a UN @ 2026-11-19 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-19 20:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Give a good error message when we can neither hash nor sort a UNION. Prior to v17 we said ERROR: could not implement UNION DETAIL: Some of the datatypes only support hashing, while others only support sorting. but this check got lost in refactoring, leading to a much less helpful message. Put it back (in generate_union_paths). Also add a couple of comparable checks in other places that seem like they could be vulnerable to this problem, and add some test coverage. Bug: #19916 Reported-by: Robins Tharakan <tharakan@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19916-8097ca71b8aa4085@postgresql.org Backpatch-through: 17 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7b4f814b8042f8bf9d7e2943181ea825c7cdf5ce Modified Files -------------- src/backend/optimizer/path/allpaths.c | 11 +++++++++++ src/backend/optimizer/plan/planner.c | 14 ++++++++++++++ src/backend/optimizer/prep/prepunion.c | 13 +++++++++++++ src/test/regress/expected/union.out | 17 +++++++++++++++++ src/test/regress/sql/union.sql | 8 ++++++++ 5 files changed, 63 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Give a good error message when we can neither hash nor sort a UN @ 2026-11-19 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-19 20:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Give a good error message when we can neither hash nor sort a UNION. Prior to v17 we said ERROR: could not implement UNION DETAIL: Some of the datatypes only support hashing, while others only support sorting. but this check got lost in refactoring, leading to a much less helpful message. Put it back (in generate_union_paths). Also add a couple of comparable checks in other places that seem like they could be vulnerable to this problem, and add some test coverage. Bug: #19916 Reported-by: Robins Tharakan <tharakan@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19916-8097ca71b8aa4085@postgresql.org Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/514d9ce3078a7610186d8bdf1f5991925000a0ab Modified Files -------------- src/backend/optimizer/plan/planner.c | 14 ++++++++++++++ src/backend/optimizer/prep/prepunion.c | 13 +++++++++++++ src/test/regress/expected/union.out | 17 +++++++++++++++++ src/test/regress/sql/union.sql | 8 ++++++++ 4 files changed, 52 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Give a good error message when we can neither hash nor sort a UN @ 2026-11-19 20:49 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-19 20:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Give a good error message when we can neither hash nor sort a UNION. Prior to v17 we said ERROR: could not implement UNION DETAIL: Some of the datatypes only support hashing, while others only support sorting. but this check got lost in refactoring, leading to a much less helpful message. Put it back (in generate_union_paths). Also add a couple of comparable checks in other places that seem like they could be vulnerable to this problem, and add some test coverage. Bug: #19916 Reported-by: Robins Tharakan <tharakan@gmail.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19916-8097ca71b8aa4085@postgresql.org Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1e8a3033a9855076e9705b0f8f9f36d3f1bb9e34 Modified Files -------------- src/backend/optimizer/plan/planner.c | 14 ++++++++++++++ src/backend/optimizer/prep/prepunion.c | 13 +++++++++++++ src/test/regress/expected/union.out | 17 +++++++++++++++++ src/test/regress/sql/union.sql | 8 ++++++++ 4 files changed, 52 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-11-19 20:49 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-19 20:49 pgsql: Give a good error message when we can neither hash nor sort a UN Tom Lane <tgl@sss.pgh.pa.us> 2026-11-19 20:49 pgsql: Give a good error message when we can neither hash nor sort a UN Tom Lane <tgl@sss.pgh.pa.us> 2026-11-19 20:49 pgsql: Give a good error message when we can neither hash nor sort a UN Tom Lane <tgl@sss.pgh.pa.us> 2026-11-19 20:49 pgsql: Give a good error message when we can neither hash nor sort a UN Tom Lane <tgl@sss.pgh.pa.us>
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