Re: Use of "long" in incremental sort code

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Use of "long" in incremental sort code
Дата
Msg-id CAApHDvqT0u8hLDXoa7VRDYvNmS0_LBbzjQ4mgrFLo8iSSEyb8g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use of "long" in incremental sort code  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: Use of "long" in incremental sort code
Список pgsql-hackers
On Wed, 4 Nov 2020 at 10:42, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> IMHO this should simply switch the current int64 variable to long, as it
> was before. Not sure about about the hashagg uint64 variable.

IMO, we should just get rid of the use of "long" here.   As far as I'm
concerned, using long in the core code at all is just unnecessary and
just increases the chances of having bugs.

How often do people forget that we support a 64-bit platform that has
sizeof(long) == 4?

Can't we use size_t and ssize_t if we really need a processor
word-sized type? And use int64/uint64 when we really want a 64-bit
type.

David



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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Dereference before NULL check (src/backend/storage/ipc/latch.c)
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Compatible defaults for LEAD/LAG