Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints
Дата
Msg-id 5118.1483634907@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval havedifferent constraints  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Ответы Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selectinginterval have different constraints  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Список pgsql-hackers
Vitaly Burovoy <vitaly.burovoy@gmail.com> writes:
>> I've written a patch which fixes that bug (in attachment).
>> Should it be registered in the CF?

> Oops. Forgot to attach the patch. Fixed.

I suspect that many of these SAMESIGN() tests you've added are not
actually adequate/useful.  That's only sufficient when the output could be
at most a factor of 2 out-of-range.  If it could overflow past the sign
bit then you need to work harder.

(By the same token, the existing SAMESIGN test in interval2tm is
wrong.)

Possibly we should consider alternatives before plowing ahead in this
direction, since adding guards to interval_in and interval computations
doesn't help with oversize values that are already stored in a database.
We could think about replacing interval2tm's output format with some
other struct that uses a TimeOffset for hours and so cannot overflow.
I'm not sure though how far the effects would propagate; it might be
more work than we want to put into this.
        regards, tom lane



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Replication/backup defaults
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP