Re: [HACKERS] Integer overflow in timestamp_part()

2016-02-02 Thread Tom Lane
[ Please use a useful Subject: line in your posts. ] Vitaly Burovoy writes: > I've just found a little bug: extracting "epoch" from the last 30 > years before Postgres' "+Infinity" leads an integer overflow: Hmm. I do not like the proposed patch much: it looks like

Re: [HACKERS] Integer overflow in timestamp_part()

2016-02-02 Thread Jim Nasby
On 2/2/16 6:39 PM, Tom Lane wrote: I'm inclined to think that a good solution would be to create an artificial restriction to not accept years beyond, say, 10 AD. That would leave us with a lot of daylight to not have to worry about corner-case overflows in timestamp arithmetic. I'm not

Re: [HACKERS] Integer overflow in timestamp_part()

2016-02-02 Thread Vitaly Burovoy
On 2/2/16, Tom Lane wrote: > [ Please use a useful Subject: line in your posts. ] I'm so sorry, it was the first time I had forgotten to look at the "Subject" field before I pressed the "Send" button. > Vitaly Burovoy writes: >> I've just found a