[HACKERS] pgbench - use enum for meta commands

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема [HACKERS] pgbench - use enum for meta commands
Дата
Msg-id alpine.DEB.2.20.1709230538130.4999@lancre
обсуждение исходный текст
Ответы Re: [HACKERS] pgbench - use enum for meta commands  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [HACKERS] pgbench - use enum for meta commands  (Aleksandr Parfenov <a.parfenov@postgrespro.ru>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?