v.21.7Improvement

Fixed PostgreSQL Array Conversion Issue with attndims

Fixed case, when sometimes conversion of postgres arrays resulted in String data type, not n-dimensional array, because attndims works incorrectly in some cases. Closes #24804. #25538 (Kseniia Sumarokova).
Fixed incorrect conversion of PostgreSQL arrays to ClickHouse data types where arrays were sometimes converted to String instead of the correct n-dimensional array type due to improper handling of the attndims attribute.

Why it matters

This fix addresses the problem where PostgreSQL arrays could be incorrectly interpreted as strings in ClickHouse, which caused data type mismatches and potential data processing errors. By correctly interpreting attndims, the feature ensures reliable and accurate conversion of PostgreSQL arrays to the appropriate n-dimensional array types in ClickHouse, improving data compatibility and integrity.

How to use it

This fix is applied automatically in ClickHouse version including this patch. Users querying PostgreSQL arrays through ClickHouse's PostgreSQL integration will now receive correctly typed n-dimensional arrays without any additional configuration or action needed.