Skip to content

Commit 03de518

Browse files
committed
Mention ANALYZE boolean options in documentation.
Commit 41b54ba allowed not only VACUUM but also ANALYZE options to take a boolean argument. But it forgot to update the documentation for ANALYZE. This commit adds the descriptions about those ANALYZE boolean options into the documentation. This patch also updates tab-completion for ANALYZE boolean options. Reported-by: Kyotaro Horiguchi Author: Fujii Masao Reviewed-by: Masahiko Sawada, Michael Paquier Discussion: https://postgr.es/m/CAHGQGwHTUt-kuwgiwe8f0AvTnB+ySqJWh95jvmh-qcoKW9YA9g@mail.gmail.com
1 parent 166f69f commit 03de518

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

doc/src/sgml/ref/analyze.sgml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
2626

2727
<phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase>
2828

29-
VERBOSE
30-
SKIP_LOCKED
29+
VERBOSE [ <replaceable class="parameter">boolean</replaceable> ]
30+
SKIP_LOCKED [ <replaceable class="parameter">boolean</replaceable> ]
3131

3232
<phrase>and <replaceable class="parameter">table_and_columns</replaceable> is:</phrase>
3333

@@ -95,6 +95,20 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
9595
</listitem>
9696
</varlistentry>
9797

98+
<varlistentry>
99+
<term><replaceable class="parameter">boolean</replaceable></term>
100+
<listitem>
101+
<para>
102+
Specifies whether the selected option should be turned on or off.
103+
You can write <literal>TRUE</literal>, <literal>ON</literal>, or
104+
<literal>1</literal> to enable the option, and <literal>FALSE</literal>,
105+
<literal>OFF</literal>, or <literal>0</literal> to disable it. The
106+
<replaceable class="parameter">boolean</replaceable> value can also
107+
be omitted, in which case <literal>TRUE</literal> is assumed.
108+
</para>
109+
</listitem>
110+
</varlistentry>
111+
98112
<varlistentry>
99113
<term><replaceable class="parameter">table_name</replaceable></term>
100114
<listitem>

doc/src/sgml/release-12.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,8 +1983,8 @@ Author: Robert Haas <rhaas@postgresql.org>
19831983
-->
19841984

19851985
<para>
1986-
Allow <command>VACUUM</command> to take optional boolean argument
1987-
specifications (Masahiko Sawada)
1986+
Allow <command>VACUUM</command> and <command>ANALYZE</command>
1987+
to take optional boolean argument specifications (Masahiko Sawada)
19881988
</para>
19891989
</listitem>
19901990

src/bin/psql/tab-complete.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,8 @@ psql_completion(const char *text, int start, int end)
21012101
*/
21022102
if (ends_with(prev_wd, '(') || ends_with(prev_wd, ','))
21032103
COMPLETE_WITH("VERBOSE", "SKIP_LOCKED");
2104+
else if (TailMatches("VERBOSE|SKIP_LOCKED"))
2105+
COMPLETE_WITH("ON", "OFF");
21042106
}
21052107
else if (HeadMatches("ANALYZE") && TailMatches("("))
21062108
/* "ANALYZE (" should be caught above, so assume we want columns */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy