Hi Dmitry,
> I presume jsonb_agg_transfn_worker have to be unified with the others.
I don't think the array code forgot it. skip_nulls is only used when
an object is finished, in uniqueifyJsonbObject(). Arrays never get
there, so setting it in jsonb_agg_transfn_worker() would change
nothing.
> From what I see it drops nulls due to ABSENT ON NULL
Right, ABSENT ON NULL is what drops it. What I meant is that the same
call keeps the key when it returns json:
ABSENT ON NULL RETURNING jsonb {}
ABSENT ON NULL RETURNING json {"a" : null}
So ABSENT ON NULL means two different things, depending on the result type.
> I mean to check per every element in the to be aggregated set.
For SQL NULL that check is PG_ARGISNULL(), which is already there.
Thanks,
Shihao