Re: [HACKERS] pgbench - use enum for meta commands

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [HACKERS] pgbench - use enum for meta commands
Дата
Msg-id CAFj8pRAeuGDftBbezDDgVWAgesbiz5OAUz8azid+tBAK_x1n5w@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] pgbench - use enum for meta commands  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers


2017-09-23 5:45 GMT+02:00 Fabien COELHO <coelho@cri.ensmp.fr>:

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.

+1

Pavel


--
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] CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it?
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] CREATE COLLATION does not sanitize ICU's BCP 47language tags. Should it?