v.21.8Improvement

Allow Unwrapped Key Expression for dictGet and dictHas in Single-Attribute Dictionary

For a dictionary with a complex key containing only one attribute, allow not wrapping the key expression in tuple for functions dictGet, dictHas. #26130 (Maksim Kita).
Allow using a single attribute complex key in dictGet and dictHas functions without wrapping the key in a tuple.

Why it matters

This feature simplifies the usage of dictionary functions when the dictionary key consists of only one attribute with a complex type. It removes the need to wrap the key expression in a tuple, making the function calls cleaner and more intuitive.

How to use it

You can now directly pass a complex key expression with a single attribute to dictGet and dictHas without enclosing it in a tuple. For example:

SELECT dictGet('dict_name', 'attribute', key_expression) FROM table;

where key_expression is the complex key attribute without tuple wrapping.