[HACKERS] Confusing error message in pgbench

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема [HACKERS] Confusing error message in pgbench
Дата
Msg-id 20170802.110328.1963639094551443169.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответы Re: [HACKERS] Confusing error message in pgbench  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Confusing error message in pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
I found an error message in pgbench is quite confusing.

pgbench -S -M extended -c 1 -T 30 test
query mode (-M) should be specified before any transaction scripts (-f or -b)

Since there's no -f or -b option is specified, users will be
confused. Actually the error occurs because pgbench implicitly
introduces a built in script for -S. To eliminate the confusion, I
think the error message should be fixed like this:

query mode (-M) should be specified before transaction type (-S or -N) or any transaction scripts (-f or -b)

Patch attached.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 4d364a1..f7ef0ed 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -3898,7 +3898,7 @@ main(int argc, char **argv)                benchmarking_option_set = true;                if
(num_scripts> 0)                {
 
-                    fprintf(stderr, "query mode (-M) should be specified before any transaction scripts (-f or
-b)\n");
+                    fprintf(stderr, "query mode (-M) should be specified before transaction type (-S or -N) or any
transactionscripts (-f or -b)\n");                    exit(1);                }                for (querymode = 0;
querymode< NUM_QUERYMODE; querymode++) 

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Proposal for CSN based snapshots