Re: BUG #17570: Unrecognized node type for query with statistics on expressions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17570: Unrecognized node type for query with statistics on expressions
Дата
Msg-id 3508845.1659627758@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17570: Unrecognized node type for query with statistics on expressions  (Japin Li <japinli@hotmail.com>)
Ответы Re: BUG #17570: Unrecognized node type for query with statistics on expressions  (Richard Guo <guofenglinux@gmail.com>)
Re: BUG #17570: Unrecognized node type for query with statistics on expressions  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-bugs
Japin Li <japinli@hotmail.com> writes:
> Attached to new patch add a test-case from Alexander Kozhemyakin.

It appears to me that this is actually very thoroughly broken.

* statext_is_compatible_clause_internal is not on board with
offsetting the attnums.

* Neither is this check for a whole-row reference (line 1628, in HEAD):

        if (bms_is_member(InvalidAttrNumber, clause_attnums))

* Although the coverage report claims this code is exercised, the
fact that nothing failed when you made only a partial fix says it's
not exercised well enough.

* The comments for statext_is_compatible_clause suck.  If they'd
defined what the arguments are, perhaps this mess would have been
prevented.  For extra credit, it'd be really nice to define what
"is compatible" means.  I'd sure not have thought that that would
include permissions checks.

            regards, tom lane



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: BUG #17571: PostgreSQL 15b2 ICU collation defined at db level sorts differently in collate clause vs implicit
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: ERROR: unterminated dollar-quoted string at or near "$$"