diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-03-25 12:16:07 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-03-25 12:16:07 -0300 |
commit | 25ee70511ec2ccbef0ad3fe64875a4d552cdcd50 (patch) | |
tree | c09319d58c61a901f01d8a58ceace8f5fd540c7f /doc/src | |
parent | 6f97457e0ddd8b421ca5e483439ef0318e6fc89a (diff) | |
download | postgresql-25ee70511ec2ccbef0ad3fe64875a4d552cdcd50.tar.gz postgresql-25ee70511ec2ccbef0ad3fe64875a4d552cdcd50.zip |
pgbench: Remove \cset
Partial revert of commit 6260cc550b0e, "pgbench: add \cset and \gset
commands".
While \gset is widely considered a useful and necessary tool for user-
defined benchmarks, \cset does not have as much value, and its
implementation was considered "not to be up to project standards"
(though I, Álvaro, can't quite understand exactly how). Therefore,
remove \cset.
Author: Fabien Coelho
Discussion: https://postgr.es/m/alpine.DEB.2.21.1903230716030.18811@lancre
Discussion: https://postgr.es/m/201901101900.mv7zduch6sad@alvherre.pgsql
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pgbench.sgml | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 24833f46bcf..f11d36620d6 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -963,48 +963,6 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d </para> <variablelist> - <varlistentry id='pgbench-metacommand-cset'> - <term> - <literal>\cset [<replaceable>prefix</replaceable>]</literal> - </term> - - <listitem> - <para> - This command may be used to end SQL queries, replacing an embedded - semicolon (<literal>\;</literal>) within a compound SQL command. - </para> - - <para> - When this command is used, the preceding SQL query is expected to - return one row, the columns of which are stored into variables named after - column names, and prefixed with <replaceable>prefix</replaceable> if provided. - </para> - - <para> - The following example sends four queries as one compound SQL command, - inducing one message sent at the protocol level. - The result of the first query is stored into variable <replaceable>one</replaceable>, - the results of the third query are stored into variables <replaceable>z_three</replaceable> - and <replaceable>z_four</replaceable>, - whereas the results of the other queries are discarded. -<programlisting> --- compound of four queries -SELECT 1 AS one \cset -SELECT 2 AS two \; -SELECT 3 AS three, 4 AS four \cset z_ -SELECT 5; -</programlisting> - </para> - - <note> - <para> - <literal>\cset</literal> does not work when empty SQL queries appear - within a compound SQL command. - </para> - </note> - </listitem> - </varlistentry> - <varlistentry id='pgbench-metacommand-gset'> <term> <literal>\gset [<replaceable>prefix</replaceable>]</literal> @@ -1012,8 +970,8 @@ SELECT 5; <listitem> <para> - This command may be used to end SQL queries, replacing a final semicolon - (<literal>;</literal>). + This command may be used to end SQL queries, taking the place of the + terminating semicolon (<literal>;</literal>). </para> <para> @@ -1026,7 +984,7 @@ SELECT 5; 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> - with integers from the last query. + with integers from the third query. The result of the second query is discarded. <programlisting> UPDATE pgbench_accounts @@ -1038,13 +996,6 @@ SELECT 1 \; SELECT 2 AS two, 3 AS three \gset p_ </programlisting> </para> - - <note> - <para> - <literal>\gset</literal> does not work when empty SQL queries appear - within a compound SQL command. - </para> - </note> </listitem> </varlistentry> |