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 https://postgrespro.ru/
v3-0001-poc-get-rid-of-magic-numbers.patch
Description: Binary data