pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: tharakan@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19916: UNION over hash-only and sort-only columns: could not devise a query plan
Date: Thu, 19 Nov 2026 15:21:19 -0500
Message-ID: <1127885.1795119679@sss.pgh.pa.us> (raw)
In-Reply-To: <19916-8097ca71b8aa4085@postgresql.org>
References: <19916-8097ca71b8aa4085@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> A UNION whose columns can't all be sorted and can't all be hashed fails
> with an internal error:
>   ERROR:  XX000: could not devise a query plan for the given query
>   LOCATION:  set_cheapest, pathnode.c:279
> tsvector has a btree opclass but no hash opclass, and aclitem has a
> hash opclass but no btree one, so neither strategy works for the query
> below. Up to 16 this was reported properly, and INTERSECT and EXCEPT
> over the same columns still are, on every branch:

Yeah, we should catch that nicely, even if it's an edge case.
Will fix, thanks for the report.

			regards, tom lane






view thread (2+ messages)

Message-ID: <1127885.1795119679@sss.pgh.pa.us>
Permalink:  ../1127885.1795119679@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1127885.1795119679@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tharakan@gmail.com
  Subject: Re: BUG #19916: UNION over hash-only and sort-only columns: could not devise a query plan
  In-Reply-To: <1127885.1795119679@sss.pgh.pa.us>
  References: <19916-8097ca71b8aa4085@postgresql.org> <1127885.1795119679@sss.pgh.pa.us>

* 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