v.23.7New Feature

Add array_agg as alias for groupArray to enhance PostgreSQL compatibility

Add array_agg as alias of groupArray for PostgreSQL compatibility. Closes #52100. ### Documentation entry for user-facing changes. #52135 (flynn).
array_agg function added as an alias to groupArray for PostgreSQL compatibility.

Why it matters

To provide compatibility with PostgreSQL syntax by allowing users to use array_agg in ClickHouse queries, which functions identically to groupArray. This eases migration and query portability between PostgreSQL and ClickHouse.

How to use it

Simply use the function array_agg in your SQL queries as you would use groupArray. For example:

SELECT key, array_agg(value) FROM table GROUP BY key;