Re: BUG #18247: Integer overflow leads to negative width

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18247: Integer overflow leads to negative width
Дата
Msg-id 2781181.1702565025@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18247: Integer overflow leads to negative width  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: BUG #18247: Integer overflow leads to negative width  (Richard Guo <guofenglinux@gmail.com>)
Список pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes:
> On Thu, Dec 14, 2023 at 5:29 PM PG Bug reporting form <
> noreply@postgresql.org> wrote:
>> EXPLAIN SELECT * FROM t;
>> QUERY PLAN
>> ------------------------------------------------------------
>> Seq Scan on t  (cost=0.00..10.00 rows=1 width=-2113929008)
>> (1 row)

> Can we just error out when an overflow occurs?

Probably better to clamp tuple width estimates to MaxAllocSize.
Anything larger would not correspond to reality anyhow.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18248: Expression is always zero
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18245: pg_restore accepts same output file name as input file name