Running postgres 11.3. Here's the sql code
create type _stats_agg_accum_type AS (
cnt bigint,
min double precision,
max double precision,
m1 double precision,
m2 double precision,
m3 double precision,
m4 double precision,
q double precision[],
n double precision[],
np double precision[],
dn double precision[]
);
create aggregate stats_agg(double precision) (
sfunc = _stats_agg_accumulator,
stype = _stats_agg_accum_type,
finalfunc = _stats_agg_finalizer,
combinefunc = _stats_agg_combiner,
parallel = safe,
initcond = '(0,,, 0, 0, 0, 0, {}, {1,2,3,4,5}, {1,2,3,4,5}, {0,0.25,0.5,0.75,1})'
);
Which gives me
ERROR: malformed array literal: "{1"
DETAIL: Unexpected end of input.
SQL state: 22P02
The empty array literal works ok. I've also tried a one element literal {1} which works fine. Whenever I have 2 or more elements it gives me this error.
As a work around I could pass in empty arrays and initialize them on the first pass, but that's ugly.