Re: Replace magic numbers with strategy numbers for B-tree indexes - Mailing list pgsql-hackers

From Nikita Malakhov
Subject Re: Replace magic numbers with strategy numbers for B-tree indexes
Date
Msg-id CAN-LCVNBk9Tdt8PdUjPGC1hBLgoxL5EX_NEegJpK5OsnBGKeOQ@mail.gmail.com
Whole thread Raw
In response to Re: Replace magic numbers with strategy numbers for B-tree indexes  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Replace magic numbers with strategy numbers for B-tree indexes
List pgsql-hackers
Hi Daniil!

Please correct if I'm wrong, but it seems Peter had another approach in mind -
magic numbers in separate macros could be easily replaced with enums and
validation functions, which would make code more readable and less 'magical'.
Please check the POC patch in attach.
I've made this just for BT strategies macros and touched only 2 source files
to make a correct but simple example.

--
Regards,
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Fabrice Chapuis
Date:
Subject: Re: Issue with logical replication slot during switchover
Next
From: Mihail Nikalayeu
Date:
Subject: Re: Adding REPACK [concurrently]