| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com> | 
| Cc: | Pantelis Theodosiou <ypercube(at)gmail(dot)com>, web+postgresql(at)modin(dot)io, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints | 
| Date: | 2017-01-05 17:11:36 | 
| Message-ID: | 6048.1483636296@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers | 
Vitaly Burovoy <vitaly(dot)burovoy(at)gmail(dot)com> writes:
> On 1/5/17, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vitaly Burovoy | 2017-01-05 19:46:28 | Re: Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints | 
| Previous Message | Vitaly Burovoy | 2017-01-05 17:06:11 | Re: Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2017-01-05 17:11:47 | Re: ALTER SYSTEM for pg_hba.conf | 
| Previous Message | Magnus Hagander | 2017-01-05 17:08:36 | Re: Replication/backup defaults |