Re: Fix overflow hazard in timestamp_pl_interval

2024-04-28 Thread Tom Lane
Joseph Koshakow writes: >> Attached is a patch that fixes some overflow/underflow hazards in >> `timestamp_pl_interval`. The microseconds overflow could produce >> incorrect result. The month overflow would generally still result in an >> error from the timestamp month field being too low, but it'

Re: Fix overflow hazard in timestamp_pl_interval

2024-04-27 Thread Joseph Koshakow
Hi all, Immediately after sending this I realized that timestamptz suffers from the same problem. Attached is an updated patch that fixes timestamptz too. Thanks, Joe Koshakow On Sat, Apr 27, 2024 at 10:59 PM Joseph Koshakow wrote: > Hi all, > > Attached is a patch that fixes some overflow/und

Fix overflow hazard in timestamp_pl_interval

2024-04-27 Thread Joseph Koshakow
Hi all, Attached is a patch that fixes some overflow/underflow hazards in `timestamp_pl_interval`. The microseconds overflow could produce incorrect result. The month overflow would generally still result in an error from the timestamp month field being too low, but it's still better to catch it e