1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Correct overflow handling in pgbench.

This patch attempts, although it's quite possible there are a few
holes, to properly detect and reported signed integer overflows in
pgbench.

Author: Fabien Coelho
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/20171212052943.k2hlckfkeft3eiio@alap3.anarazel.de
This commit is contained in:
Andres Freund
2018-09-27 21:48:47 -07:00
parent 78ea8b5daa
commit 92a0342a90
7 changed files with 174 additions and 58 deletions

View File

@ -989,6 +989,13 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
are <literal>FALSE</literal>.
</para>
<para>
Too large or small integer and double constants, as well as
integer arithmetic operators (<literal>+</literal>,
<literal>-</literal>, <literal>*</literal> and <literal>/</literal>)
raise errors on overflows.
</para>
<para>
When no final <token>ELSE</token> clause is provided to a
<token>CASE</token>, the default value is <literal>NULL</literal>.