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

From Fabien COELHO
Subject [HACKERS] pgbench - use enum for meta commands
Date
Msg-id alpine.DEB.2.20.1709230538130.4999@lancre
Whole thread Raw
Responses Re: [HACKERS] pgbench - use enum for meta commands
Re: [HACKERS] pgbench - use enum for meta commands
List pgsql-hackers
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.
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?