Re: [PATCH] Allow SJE to recognize GiST-backed temporal primary keys

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Paul A Jungwirth <pj@illuminatedcomputing.com>
Date: 2026-04-22T01:54:33Z
Lists: pgsql-hackers
On Wed, 22 Apr 2026 at 07:18, SATYANARAYANA NARLAPURAM
<satyanarlapuram@gmail.com> wrote:
> relation_has_unique_index_for() checks whether join clause equality
> operators belong to the index's opfamily via mergeopfamilies.  Since
> mergeopfamilies only lists btree opfamilies, this check always fails
> for GiST-backed unique indexes such as those created by PRIMARY KEY
> with WITHOUT OVERLAPS, preventing self-join elimination.

Please add to the 20-1 CF [1].

David

[1] https://commitfest.postgresql.org/59/