Re: BUG #17847: Unaligned memory access in ltree_gist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17847: Unaligned memory access in ltree_gist
Дата
Msg-id 2656633.1681831542@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17847: Unaligned memory access in ltree_gist  (Pavel Borisov <pashkin.elfe@gmail.com>)
Ответы Re: BUG #17847: Unaligned memory access in ltree_gist  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-bugs
Pavel Borisov <pashkin.elfe@gmail.com> writes:
> On Tue, 18 Apr 2023 at 19:06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The DETAIL message's grammar seems a bit off.  Also, this is confusing the
>> range limitation with the alignment requirement.  How about just saying
>> ERROR:  siglen value must be a multiple of 4

> I definitely like this wording.

>> and leaving out-of-range cases to be handled by the existing check?

> But that means that if we try 2025 then we just get it is not multiple
> of 4 (and no clue of the range). Then we try 2028 and get another
> error that it's outside of range. I suppose giving clues one by one
> makes this look like a step-by-step quest. But in principle it's
> possible.

Well, that's the case just about everywhere else that there are multiple
constraints on an input.  It'd be impossibly unwieldy, and confusing,
for every error message to include details on all the other errors
you might have hit if you didn't hit that one.

FWIW, I find it odd that the multiple-of-4 error comes out in advance
of the range check; that seems backwards somehow.  Maybe we should
alter the order of applying the range check and the custom validator?

            regards, tom lane



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

Предыдущее
От: Pavel Borisov
Дата:
Сообщение: Re: BUG #17847: Unaligned memory access in ltree_gist
Следующее
От: Richard Guo
Дата:
Сообщение: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger