From 7a622b2731db5d0f6db8a3d0af88177f96d1cb2e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 5 May 2016 14:51:00 -0400 Subject: Rename pgbench min/max to least/greatest, and fix handling of double args. These functions behave like the backend's least/greatest functions, not like min/max, so the originally-chosen names invite confusion. Per discussion, rename to least/greatest. I also took it upon myself to make them return double if any input is double. The previous behavior of silently coercing all inputs to int surely does not meet the principle of least astonishment. Copy-edit some of the other new functions' documentation, too. --- doc/src/sgml/ref/pgbench.sgml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index a6c69ff344d..e6c7c94fe25 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -935,14 +935,15 @@ pgbench options dbname abs(a) same as a - integer or double absolute value + absolute value abs(-17) 17 debug(a) same as a - print to stderr the given argument + print a to stderr, + and return a debug(5432.1) 5432.1 @@ -961,23 +962,23 @@ pgbench options dbname 9 - max(i [, ... ] ) - integer - maximum value - max(5, 4, 3, 2) + greatest(a [, ... ] ) + double if any a is double, else integer + largest value among arguments + greatest(5, 4, 3, 2) 5 - min(i [, ... ] ) - integer - minimum value - min(5, 4, 3, 2) - 2 + least(a [, ... ] ) + double if any a is double, else integer + smallest value among arguments + least(5, 4, 3, 2.1) + 2.1 pi() double - value of the PI constant + value of the constant PI pi() 3.14159265358979323846 -- cgit v1.2.3