Re: ERROR: only immutable functions supported in continuous aggregate view

2023-03-12 Thread Martijn de Munnik
Ok, now I understand, thank you. My solution is to create materialized view with intermediate values and the create a normal view on top that uses the intermediate values and the jsonb_build_object function to create the desired result. Kind regards, Martijn de Munnik On 2023-03-11 16:47, To

Re: ERROR: only immutable functions supported in continuous aggregate view

2023-03-11 Thread Tom Lane
Martijn de Munnik writes: > The error is caused by the jsonb_build_object function, is there any > reason why this function is not IMMUTABLE? It can invoke arbitrary datatype output functions, some of which are not immutable. We unfortunately lack any infrastructure that would allow reasoning th