Replace magic numbers with strategy numbers for B-tree indexes

Daniil Davydov <3danissimo@gmail.com>

From: Daniil Davydov <3danissimo@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-30T03:21:07Z
Lists: pgsql-hackers

Attachments

Hi,
I noticed that some asserts and cycles use magic numbers 1 and 0
instead of BTLessStrategyNumber and InvalidStrategy.
At the same time, the BTMaxStrategyNumber macro is used there.
I suggest using appropriate macros for 1 and 0 values.

Please, see attached patch (targeted on the master branch).

--
Best regards,
Daniil Davydov