Re: Remove dependence on integer wrapping

Поиск
Список
Период
Сортировка
От jian he
Тема Re: Remove dependence on integer wrapping
Дата
Msg-id CACJufxERqAgy4YBwc2hLZY=hw1kD2m6AVD3=kyAen8=HeLsfmw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove dependence on integer wrapping  (Joseph Koshakow <koshy44@gmail.com>)
Ответы Re: Remove dependence on integer wrapping
Список pgsql-hackers
On Tue, Jul 23, 2024 at 6:56 AM Joseph Koshakow <koshy44@gmail.com> wrote:
>
> The specific bug that this patch fixes is preventing the following
> statement:
>
>     # INSERT INTO arroverflowtest(i[-2147483648:2147483647]) VALUES ('{1}');
>
> So we may want to add that test back in.
>
I agree with you.



also v13-0003-Remove-dependence-on-integer-wrapping-for-jsonb.patch
in setPathArray we change to can

        if (idx == PG_INT32_MIN || -idx > nelems)
        {
            /*
             * If asked to keep elements position consistent, it's not allowed
             * to prepend the array.
             */
            if (op_type & JB_PATH_CONSISTENT_POSITION)
                ereport(ERROR,
                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                         errmsg("path element at position %d is out of
range: %d",
                                level + 1, idx)));
            idx = PG_INT32_MIN;
        }



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

Предыдущее
От: kuroda.keisuke@nttcom.co.jp
Дата:
Сообщение: Re: Add privileges test for pg_stat_statements to improve coverage
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: [18] Policy on IMMUTABLE functions and Unicode updates