Re: remaining sql/json patches

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: remaining sql/json patches
Дата
Msg-id CA+HiwqGGqJ=vjRr1Y_8KRc9ZtabaLwxEhEGHCRXnr1UTw1o-7Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: remaining sql/json patches  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
Hi Alexander,

On Fri, Jun 28, 2024 at 5:00 PM Alexander Lakhin <exclusion@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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: cfbot update: Using GitHub for patch review
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: Why is infinite_recurse test suddenly failing?