pgbench - use enum for meta commands
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-09-23T03:45:35Z
Lists: pgsql-hackers
Attachments
- pgbench-enum-meta-1.patch (text/x-diff) patch
Minor code enhancement. While having a look at adding if/elif/else/endif to pgbench, and given the current gset/cset added meta commands in cf queue, it occured to me that repeated string comparisons to check for the various meta commands is neither efficient nor readable. Use an enum instead, which are extensively used already for other similar purposes. -- Fabien.
Commits
-
pgbench: replace run-time string comparisons with an enum identifier.
- f987f83de20a 11.0 landed