What is equivalent for LISTAGG in postgres?

I need to replace the Oracle driver with the latest postgres.

Postgres does not know the LISTAGG function. I have to contact the values ​​separated by commas.

What is equivalent to the Oracle LISTAGG function in Postgres?

Thanks.

+8
function database oracle postgresql listagg
source share
1 answer

Equivalent function in Postgres string_agg()

 select string_agg(col,',') from my_table 

string_agg : input values ​​are combined into a string, separated by a separator

+11
source share

All Articles