all-things-risingwave

How to remove braces around an array column in a materialized view?

Jim wants to remove the braces {} around the content of an array column when creating a materialized view. He provided an example of the column data and prefers it to appear as self-signed,database rather than {self-signed, database}.

Ji

Jim

Asked on Jan 08, 2024

To remove the braces around an array column in a materialized view, you can use the string_agg function in RisingWave. Here's an example of how you can achieve this:

SELECT string_agg(tag, ',') AS tags
FROM your_table;
Jan 08, 2024Edited by