On Fri, Feb 27, 2026 at 11:44 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> I wonder if we can fix it by wrapping the JSON_ARRAYAGG in a COALESCE
> to catch the NULL and convert it to an empty array; ie:
>
> SELECT COALESCE(
> JSON_ARRAYAGG(a [FORMAT] [RETURNING] [ON NULL]),
> '[]'::[RETURNING_TYPE]
> ) FROM (query) q(a)
The attached patch seems to fix it.
- Richard