Re: A few cases of left shifting negative integers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A few cases of left shifting negative integers
Дата
Msg-id 26124.1440176622@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A few cases of left shifting negative integers  (Piotr Stefaniak <postgres@piotr-stefaniak.me>)
Ответы Re: A few cases of left shifting negative integers  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> during my testing I've found cases of left-shifting negative integers 
> during run-time and I was recently encouraged to post a report of them, 
> so here it is (done against 960ea971e66bcd621ba88841b4cb85c7f0e7c383).

What's your concern exactly?  The behavior is well-defined, at least as
long as we don't shift far enough to have integer overflow, and I believe
in most of these cases that's not possible.  In int8shl etc, you just get
whatever the machine does with that, which seems fine to me; we do not
document any particular semantics for such cases.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Make HeapTupleSatisfiesMVCC more concurrent
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: remove unused ExecGetScanType