Detect overflow in timestamp[tz] subtraction.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 8028e294b456bf1539649527fd98b3985fa4752a
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-02-20T22:26:25Z
Releases: 16.0
Detect overflow in timestamp[tz] subtraction.

It's possible to overflow the int64 microseconds field of the
output interval when subtracting two timestamps.  Detect that
instead of silently returning a bogus result.

Nick Babadzhanian

Discussion: https://postgr.es/m/CABw73Uq2oJ3E+kYvvDuY04EkhhkChim2e-PaghBDjOmgUAMWGw@mail.gmail.com

Files

Discussion