From f67b113ac62777d18cd20d3c4d05be964301b936 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 22 Mar 2018 17:42:03 +0300 Subject: Add \if support to pgbench Patch adds \if to pgbench as it done for psql. Implementation shares condition stack code with psql, so, this code is moved to fe_utils directory. Author: Fabien COELHO with minor editorization by me Review by: Vik Fearing, Fedor Sigaev Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.20.1711252200190.28523@lancre --- doc/src/sgml/ref/pgbench.sgml | 15 +++++++++++++++ doc/src/sgml/ref/psql-ref.sgml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index f07ddf1226e..d52d324bf0d 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -900,6 +900,21 @@ pgbench options d + + \if expression + \elif expression + \else + \endif + + + This group of commands implements nestable conditional blocks, + similarly to psql's . + Conditional expressions are identical to those with \set, + with non-zero values interpreted as true. + + + + \set varname expression diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index bfdf8597311..10b97950ec1 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -2169,7 +2169,7 @@ hello 10 - + \if expression \elif expression \else -- cgit v1.2.3