Hi Alexander,

On Fri, Jun 28, 2024 at 5:00 PM Alexander Lakhin <exclus...@gmail.com> wrote:
>
> Hi Amit,
>
> 28.06.2024 09:15, Amit Langote wrote:
> > Hi Alexander,
> >
> >
> > Thanks for the report.  Yeah, those comments that got added in
> > 7081ac46ace are obsolete.
> >
>
> Thanks for paying attention to that!
>
> Could you also look at comments for transformJsonObjectAgg() and
> transformJsonArrayAgg(), aren't they obsolete too?

You're right.  I didn't think they needed to be similarly fixed,
because I noticed the code like the following in in
transformJsonObjectAgg() which sets the OID of the function to call
from, again, JsonConstructorExpr:

    {
        if (agg->absent_on_null)
            if (agg->unique)
                aggfnoid = F_JSONB_OBJECT_AGG_UNIQUE_STRICT;
            else
                aggfnoid = F_JSONB_OBJECT_AGG_STRICT;
        else if (agg->unique)
            aggfnoid = F_JSONB_OBJECT_AGG_UNIQUE;
        else
            aggfnoid = F_JSONB_OBJECT_AGG;

        aggtype = JSONBOID;
    }

So, yes, the comments for them should be fixed too like the other two
to also mention JsonConstructorExpr.

Updated patch attached.

Wonder if Alvaro has any thoughts on this.

-- 
Thanks, Amit Langote

Attachment: v2-0001-SQL-JSON-Fix-some-obsolete-comments.patch
Description: Binary data

Reply via email to