Surely this code in setrefs.c is wrong?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Surely this code in setrefs.c is wrong?
Дата
Msg-id 2277537.1694301772@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Surely this code in setrefs.c is wrong?
Список pgsql-hackers
I happened to notice this bit in fix_expr_common's processing
of ScalarArrayOpExprs:

        set_sa_opfuncid(saop);
        record_plan_function_dependency(root, saop->opfuncid);

        if (!OidIsValid(saop->hashfuncid))
            record_plan_function_dependency(root, saop->hashfuncid);

        if (!OidIsValid(saop->negfuncid))
            record_plan_function_dependency(root, saop->negfuncid);

Surely those if-conditions are exactly backward, and we should be
recording nonzero hashfuncid and negfuncid entries, not zero ones.
As-is, the code's a no-op because record_plan_function_dependency
will ignore OIDs less than FirstUnpinnedObjectId, including zero.

"git blame" blames 50e17ad28 and 29f45e299 for these, so v14
has only half the problem of later branches.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18097: Immutable expression not allowed in generated at
Следующее
От: David Rowley
Дата:
Сообщение: Re: Surely this code in setrefs.c is wrong?