pgbench - add option to show actual builtin script code

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-04-08T15:43:24Z
Lists: pgsql-hackers

Attachments

Hello devs,

The minor attached patch $SUBJECT, so that it can be inspected easily, 
instead of having to look at the source code or whatever.

   sh> pgbench --list select-only
   -- select-only: <builtin: select only>
   \set aid random(1, 100000 * :scale)
   SELECT abalance FROM pgbench_accounts WHERE aid = :aid;

The builtin list output is also slightly improved:

   sh> pgbench -b list
   Available builtin scripts:
         tpcb-like: <builtin: TPC-B (sort of)>
     simple-update: <builtin: simple update>
       select-only: <builtin: select only>

-- 
Fabien.

Commits

  1. Provide pgbench --show-script to dump built-in scripts.