coalesce
新的 jOOQ 3.14 SQL/JSON 支持版本(在 PostgreSQL 中)中的等价物是什么?
select coalesce(json_agg(t.*), '[]'::json)
from (select 'test' as mycol where 1 = 2) t;
不幸的是,以下失败并出现错误“COALESCE 类型 json 和 uuid[] 无法匹配”。
coalesce(jsonArrayAgg(mycol), emptyArray<type>())