Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints
Date
Msg-id 6048.1483636296@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selectinginterval have different constraints  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Responses Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selectinginterval have different constraints  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
List pgsql-bugs
Vitaly Burovoy <vitaly.burovoy@gmail.com> writes:
> On 1/5/17, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

> If values with overflow are already in a database, what do you expect
> a new output function should fix?

My point is that ideally, any value that can physically fit into struct
Interval ought to be considered valid.  The fact that interval_out can't
cope is a bug in interval_out, which ideally we would fix without
artificially restricting the range of the datatype.

Now, the problem with that of course is that it's not only interval_out
but multiple other places.  But your proposed patch also requires touching
nearly everything interval-related, so I'm not sure it has any advantage
that way over the less restrictive answer.
        regards, tom lane



pgsql-bugs by date:

Previous
From: Vitaly Burovoy
Date:
Subject: Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selectinginterval have different constraints
Next
From: Vitaly Burovoy
Date:
Subject: Re: [HACKERS] Re: [BUGS][PATCH] BUG #14486: Inserting and selectinginterval have different constraints