Re: extend pgbench expressions with functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2016-01-27 22:07:59
Message-ID: alpine.DEB.2.10.1601272249490.12620@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

>>> And this one generates a core dump:
>>> \set cid debug(-9223372036854775808 / -1)
>>> Floating point exception: 8 (core dumped)
>
> That does not seem acceptable to me. I don't want pgbench to die a
> horrible death if a floating point exception occurs any more than I want
> the server to do the same. I want the error to be properly caught and
> reported.

Please note that this issue/bug/feature/whatever already exists just for
these two values (1/2**128 probability), it is not related to this patch
about functions.

sh> pgbench --version
pgbench (PostgreSQL) 9.5.0

sh> cat div.sql
\set i -9223372036854775807
\set i :i - 1
\set i :i / -1

sh> pgbench -f div.sql
starting vacuum...end.
Floating point exception (core dumped)

I do not think that it is really worth fixing, but I will not prevent
anyone to fix it.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-01-27 22:43:34 Re: extend pgbench expressions with functions
Previous Message Robert Haas 2016-01-27 21:35:43 Re: Patch: ResourceOwner optimization for tables with many partitions