Re: extend pgbench expressions with functions
От | Fabien COELHO |
---|---|
Тема | Re: extend pgbench expressions with functions |
Дата | |
Msg-id | alpine.DEB.2.10.1603082137360.25393@sto обсуждение исходный текст |
Ответ на | Re: extend pgbench expressions with functions (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: extend pgbench expressions with functions
|
Список | pgsql-hackers |
Hello Robert. Here is a v34 b & c. > // comments are not allowed. I'd just remove the two you have. Back to the eighties! > It make no sense to exit(1) and then return 0, so don't do that. I > might write this code as: > This would get rid of the internal-error case here altogether in favor > of testing it via an assertion. I've put assertions instead of exit in some places. > I think that coerceToInt() should not exit(1) when an overflow occurs; I think that it should, because the only sane option for the user is to fix the script and relaunch the bench: counting errors has no added value for the user. The attached version does some error handling instead, too bad. > Now, if rval is out of range of an integer, that is going to overflow > while trying to see whether it should divide by zero. I could not find a place where there where such potential issue. If the value is zero, it cannot overflow when cast to int. If it is not zero but it overflows, then it is an overflow, so it should overflow. Maybe I misunderstood your point. -- Fabien.
В списке pgsql-hackers по дате отправления: