Make amcanorder independent of amconsistentordering
authorPeter Eisentraut <[email protected]>
Sat, 8 Mar 2025 08:37:06 +0000 (09:37 +0100)
committerPeter Eisentraut <[email protected]>
Sat, 8 Mar 2025 08:37:06 +0000 (09:37 +0100)
Follow-up to commit af4002b381d: Make amconsistentordering not depend
on amcanorder.  Although they are related, they are independent
properties.

Reported-by: Tom Lane <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/E1tngY6-0000UL-2n%40gemulon.postgresql.org

src/backend/utils/cache/lsyscache.c

index a712a432938b6f639883b4c41e9ecb2c87aa802f..80c5a3fcfb724d07c52c725bea939c9219610378 100644 (file)
@@ -750,7 +750,7 @@ equality_ops_are_compatible(Oid opno1, Oid opno2)
  * they belong to the same family.)
  *
  * (This is identical to equality_ops_are_compatible(), except that we check
- * amcanorder plus amconsistentordering instead of amconsistentequality.)
+ * amconsistentordering instead of amconsistentequality.)
  */
 bool
 comparison_ops_are_compatible(Oid opno1, Oid opno2)
@@ -782,7 +782,7 @@ comparison_ops_are_compatible(Oid opno1, Oid opno2)
        {
            IndexAmRoutine *amroutine = GetIndexAmRoutineByAmId(op_form->amopmethod, false);
 
-           if (amroutine->amcanorder && amroutine->amconsistentordering)
+           if (amroutine->amconsistentordering)
            {
                result = true;
                break;