Subject: pgsql: Allow non-btree unique indexes for partition keys

From: Peter Eisentraut <[email-masked]>
Date: Tue, 18 Mar 2025 10:34:51 +0000

Allow non-btree unique indexes for partition keys

We were rejecting non-btree indexes in some cases owing to the
inability to determine the equality operators for other index AMs;
that problem no longer exists, because we can look up the equality
operator using COMPARE_EQ.  The problem of not knowing the strategy
number for equality in other index AMs is already resolved.

Stop rejecting the indexes upfront, and instead reject any for which
the equality operator lookup fails.

Author: Mark Dilger <[email-masked]>
Discussion: https://www.postgresql.org/message-id/flat/[email-masked]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f278e1fe300ab1b7d43c3efb55a29aa17e5f5dda

Modified Files
--------------
src/backend/commands/indexcmds.c | 30 +++++++++++-------------------
1 file changed, 11 insertions(+), 19 deletions(-)