Re: pgbench - use enum for meta commands

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Aleksandr Parfenov <a(dot)parfenov(at)postgrespro(dot)ru>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, Fabien Coelho <postgresql(dot)org(at)coelho(dot)net>
Subject: Re: pgbench - use enum for meta commands
Date: 2017-11-02 16:48:56
Message-ID: alpine.DEB.2.20.1711021744320.11757@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> The only thing I'm not quite sure about is a comment "which meta command
> ...". Maybe it's better to write it without question word, something
> like "meta command identifier..."?

Ok. I agree.

Updated version attached. I also added a const on a function parameter.

Just a note about the motivation: I want to add the same "\if" syntax
added to psql, but it requires to look at the meta command in a number of
places to manage the automaton status, and the strcmp solution looked both
ugly and inefficient. So this small refactoring is just a preliminary to
the "\if" patch, some day, after this one get committed, if it gets

> The new status of this patch is: Ready for Committer

Thanks for the review.


In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-11-02 16:50:52 Re: pgbench - use enum for meta commands
Previous Message Michael Paquier 2017-11-02 16:48:11 Re: Removing wal_keep_segments as default configuration in