Remove useless int64 range checks on BIGINT sequence MINVALUE/MAXVALUE values

Поиск
Список
Период
Сортировка
От Greg Nancarrow
Тема Remove useless int64 range checks on BIGINT sequence MINVALUE/MAXVALUE values
Дата
Msg-id CAJcOf-c9KBUZ8ow_6e=WSfbbEyTKfqV=VwoFuODQVYMySHtusw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Remove useless int64 range checks on BIGINT sequence MINVALUE/MAXVALUE values  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
Hi,

Sequence MINVALUE/MAXVALUE values are read into "int64" variables and
then range-checked according to the sequence data-type.
However, for a BIGINT sequence, checking whether these are <
PG_INT64_MIN or > PG_INT64_MAX always evaluates to false, as an int64
can't hold such values.
I've attached a patch to remove those useless checks.
The MINVALUE/MAXVALUE values are anyway int64 range-checked prior to
this, as part of conversion to int64.

Regards,
Greg Nancarrow
Fujitsu Australia

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Fix for segfault in logical replication on master
Следующее
От: Andres Freund
Дата:
Сообщение: Re: seawasp failing, maybe in glibc allocator