Re: [HACKERS] pgbench - use enum for meta commands - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [HACKERS] pgbench - use enum for meta commands
Date
Msg-id alpine.DEB.2.20.1711021744320.11757@lancre
Whole thread Raw
In response to Re: [HACKERS] pgbench - use enum for meta commands  (Aleksandr Parfenov <a.parfenov@postgrespro.ru>)
Responses Re: [HACKERS] pgbench - use enum for meta commands
List 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 
committed.

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

Thanks for the review.

-- 
Fabien.


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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Removing wal_keep_segments as default configuration in PostgresNode.pm
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench - use enum for meta commands