Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+16-2
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

+2-2
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

+2
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)