pgbench doc fix - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject pgbench doc fix
Date
Msg-id 20181030.103654.2249812451112831300.t-ishii@sraoss.co.jp
Whole thread Raw
Responses Re: pgbench doc fix  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
pgbench doc (and some comments in pgbench.c) regarding "-M prepared"
option is not quite correct.

------------------------------------------------------------------------
-M querymode
--protocol=querymode

    Protocol to use for submitting queries to the server:

        simple: use simple query protocol.

        extended: use extended query protocol.

        prepared: use extended query protocol with prepared statements.
------------------------------------------------------------------------

Actually "extended" mode uses prepared statements too. The only
difference is, in extended mode *unnamed* prepared statements are
used, while in prepared mode *named* prepared statements are used.

Also, in extended query protocol, prepared statements are always used
anyway. Thus "use extended query protocol with prepared statements"
does not give any useful information to users.

I think this should be changed to:

        prepared: use extended query protocol with named prepared statements.

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/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index b5e3a62a33..3a7fe25342 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -470,7 +470,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
             <para><literal>extended</literal>: use extended query protocol.</para>
            </listitem>
            <listitem>
-            <para><literal>prepared</literal>: use extended query protocol with prepared statements.</para>
+            <para><literal>prepared</literal>: use extended query protocol with named prepared statements.</para>
            </listitem>
           </itemizedlist>
         The default is simple query protocol.  (See <xref linkend="protocol"/>
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 81bc6d8a6e..915f084e10 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -458,7 +458,7 @@ typedef enum QueryMode
 {
     QUERY_SIMPLE,                /* simple query */
     QUERY_EXTENDED,                /* extended query */
-    QUERY_PREPARED,                /* extended query with prepared statements */
+    QUERY_PREPARED,                /* extended query with named prepared statements */
     NUM_QUERYMODE
 } QueryMode;


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: partition tree inspection functions
Next
From: Amit Langote
Date:
Subject: Re: partition tree inspection functions