diff options
author | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-11-09 09:55:39 +0000 |
---|---|---|
committer | Dean Rasheed <dean.a.rasheed@gmail.com> | 2023-11-09 09:55:39 +0000 |
commit | dea12b40d5210332453f4350e1653048b43fdb7a (patch) | |
tree | 407fadbe36dfda43b3884060815acbb0206527e5 /src/tutorial/funcs.source | |
parent | 99fa98766fa59270083606d9386386c3e7131a7a (diff) | |
download | postgresql-dea12b40d5210332453f4350e1653048b43fdb7a.tar.gz postgresql-dea12b40d5210332453f4350e1653048b43fdb7a.zip |
Fix corner-case 64-bit integer subtraction bug on some platforms.
When computing "0 - INT64_MIN", most platforms would report an
overflow error, which is correct. However, platforms without integer
overflow builtins or 128-bit integers would fail to spot the overflow,
and incorrectly return INT64_MIN.
Back-patch to all supported branches.
Patch be me. Thanks to Jian He for initial investigation, and Laurenz
Albe and Tom Lane for review.
Discussion: https://postgr.es/m/CAEZATCUNK-AZSD0jVdgkk0N%3DNcAXBWeAEX-QU9AnJPensikmdQ%40mail.gmail.com
Diffstat (limited to 'src/tutorial/funcs.source')
0 files changed, 0 insertions, 0 deletions