Re: Unexpected interval comparison

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unexpected interval comparison
Дата
Msg-id 23053.1491233725@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Unexpected interval comparison  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Unexpected interval comparison
Список pgsql-general
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> Ok, the attached patch changes the result type of
> interval_cmp_value from TimeOffset(=int64) to new 128 bit
> LinearInterval. The value is hidden under the functions
> interval_eq/ge.../cmp and all other stuff seems to use the
> functions.

Looking at this now ... why isn't the INT64_AU32 macro just

#define INT64_AU32(i64) ((i64) >> 32)

?  The business with subtracting and re-adding 1 seems unnecessary, and it
also creates a risk of overflow with the minimum possible int64 value.

            regards, tom lane


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: My humble tribute to psql -- usql v0.5.0
Следующее
От: Joe Conway
Дата:
Сообщение: Re: PostgreSQL and Kubernetes