v.19.16New Feature

Add a Function Getmacro(name) That Returns String with the Value of Corresponding from Server Configuration

Add a function getMacro(name) that returns String with the value of corresponding <macros> from server configuration. #7240 (alexey-milovidov)
Introduces the getMacro(name) function to retrieve the value of server configuration macros as strings.

Why it matters

This feature enables users to access the values of configuration macros defined in the section of the server configuration directly within SQL queries or expressions, allowing for more dynamic and configurable query logic based on server settings.

How to use it

Use the function by calling getMacro('macro_name') in your SQL queries or expressions, where 'macro_name' is the name of the macro defined in the server configuration. The function returns the corresponding macro value as a string.