v.24.12Improvement
Support Dynamic Type in ifNull and coalesce Functions
SupportDynamictype in functionsifNullandcoalesce. #72772 (Pavel Kruglov).
Why it matters
This feature enables theifNull and coalesce functions to handle columns or expressions of the Dynamic data type, allowing users to work seamlessly with nullable dynamic data structures and improve flexibility when managing JSON-like data.How to use it
Users can directly use theifNull and coalesce functions with Dynamic type arguments in their SQL queries without any additional configuration. Example usage:SELECT ifNull(dynamic_column, '{}'::Dynamic) FROM table;
SELECT coalesce(dynamic_column1, dynamic_column2, '{}'::Dynamic) FROM table;