aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-11-07 11:22:52 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-11-07 11:22:58 -0500
commita7145f6bc8b7774a29f3841552a463fb20ea98d7 (patch)
tree18e902b66a9955fe8b47d9d6f819cf57060c2e65 /src/backend/commands/trigger.c
parenteffa40281bb1f6c71e81c980f86852ab3be603c3 (diff)
downloadpostgresql-a7145f6bc8b7774a29f3841552a463fb20ea98d7.tar.gz
postgresql-a7145f6bc8b7774a29f3841552a463fb20ea98d7.zip
Fix integer-overflow edge case detection in interval_mul and pgbench.
This patch adopts the overflow check logic introduced by commit cbdb8b4c0 into two more places. interval_mul() failed to notice if it computed a new microseconds value that was one more than INT64_MAX, and pgbench's double-to-int64 logic had the same sorts of edge-case problems that cbdb8b4c0 fixed in the core code. To make this easier to get right in future, put the guts of the checks into new macros in c.h, and add commentary about how to use the macros correctly. Back-patch to all supported branches, as we did with the previous fix. Yuya Watari Discussion: https://postgr.es/m/CAJ2pMkbkkFw2hb9Qb1Zj8d06EhWAQXFLy73St4qWv6aX=vqnjw@mail.gmail.com
Diffstat (limited to 'src/backend/commands/trigger.c')
0 files changed, 0 insertions, 0 deletions