pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rename pgbench min/max to least/greatest, and fix handling of do
Date: Thu, 05 May 2016 18:51:13 +0000
Message-ID: <E1ayOMj-0003ay-8e@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7a622b2731db5d0f6db8a3d0af88177f96d1cb2e

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 25 +++++++++--------
src/bin/pgbench/exprparse.y   |  8 +++---
src/bin/pgbench/pgbench.c     | 64 ++++++++++++++++++++++++++++++++-----------
src/bin/pgbench/pgbench.h     |  4 +--
4 files changed, 67 insertions(+), 34 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (3+ messages)  latest in thread

Message-ID: <E1ayOMj-0003ay-8e@gemulon.postgresql.org>
Permalink:  ../E1ayOMj-0003ay-8e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ayOMj-0003ay-8e@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Rename pgbench min/max to least/greatest, and fix handling of do
  In-Reply-To: <E1ayOMj-0003ay-8e@gemulon.postgresql.org>
  References: <E1ayOMj-0003ay-8e@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox