diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-15 18:33:03 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-03-15 18:33:03 -0300 |
commit | 9aa491abbf07ca8385a429385be8d68517384fdf (patch) | |
tree | 4dbfcf06d0b125fdcb4f3568bdc840f3c2d4c20d /doc/src | |
parent | acb7e4eb6b1c614c68a62fb3a6a5bba1af0a2659 (diff) | |
download | postgresql-9aa491abbf07ca8385a429385be8d68517384fdf.tar.gz postgresql-9aa491abbf07ca8385a429385be8d68517384fdf.zip |
Add libpq pipeline mode support to pgbench
New metacommands \startpipeline and \endpipeline allow the user to run
queries in libpq pipeline mode.
Author: Daniel Vérité <daniel@manitou-mail.org>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/b4e34135-2bd9-4b8a-94ca-27d760da26d7@manitou-mail.org
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pgbench.sgml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 299d93b2419..50cf22ba6ba 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -1111,6 +1111,12 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d </para> <para> + <literal>\gset</literal> and <literal>\aset</literal> cannot be used in + pipeline mode, since the query results are not yet available by the time + the commands would need them. + </para> + + <para> The following example puts the final account balance from the first query into variable <replaceable>abalance</replaceable>, and fills variables <replaceable>p_two</replaceable> and <replaceable>p_three</replaceable> @@ -1270,6 +1276,22 @@ SELECT 4 AS four \; SELECT 5 AS five \aset </programlisting></para> </listitem> </varlistentry> + + <varlistentry id='pgbench-metacommand-pipeline'> + <term><literal>\startpipeline</literal></term> + <term><literal>\endpipeline</literal></term> + + <listitem> + <para> + These commands delimit the start and end of a pipeline of SQL + statements. In pipeline mode, statements are sent to the server + without waiting for the results of previous statements. See + <xref linkend="libpq-pipeline-mode"/> for more details. + Pipeline mode requires the use of extended query protocol. + </para> + </listitem> + </varlistentry> + </variablelist> </refsect2> |