Custom aggregate function parallel = safe produces syntax in postgres 13.3

Viewed 109
1 Answers

You can use the new or the old syntax. There is no BASETYPE in the new version and no PARALLEL in the old one. In the new syntax you should define the basetype as arg_data_type:

CREATE AGGREGATE public.first(anyelement) (
        sfunc    = public.first_agg,
        stype    = anyelement,
        parallel = safe
);
Related