Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-07-03 Thread Daniil Davydov
Hi, On Wed, Jul 2, 2025 at 6:24 PM Peter Eisentraut wrote: > > On 30.06.25 05:21, Daniil Davydov wrote: > > 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

Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-07-02 Thread Peter Eisentraut
On 30.06.25 05:21, Daniil Davydov wrote: 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. This code, bot

Re: Replace magic numbers with strategy numbers for B-tree indexes

2025-06-29 Thread Dilip Kumar
On Mon, Jun 30, 2025 at 8:51 AM Daniil Davydov <3daniss...@gmail.com> wrote: > > 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 appropria

Replace magic numbers with strategy numbers for B-tree indexes

2025-06-29 Thread Daniil Davydov
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)