From 03de5187d50af67d154a47cf00899290dca13003 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Thu, 23 May 2019 01:18:16 +0900 Subject: [PATCH] Mention ANALYZE boolean options in documentation. Commit 41b54ba78e 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 --- doc/src/sgml/ref/analyze.sgml | 18 ++++++++++++++++-- doc/src/sgml/release-12.sgml | 4 ++-- src/bin/psql/tab-complete.c | 2 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index fea7f46521..4e70b513b5 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -26,8 +26,8 @@ ANALYZE [ VERBOSE ] [ table_and_columnswhere option can be one of: - VERBOSE - SKIP_LOCKED + VERBOSE [ boolean ] + SKIP_LOCKED [ boolean ] and table_and_columns is: @@ -95,6 +95,20 @@ ANALYZE [ VERBOSE ] [ table_and_columns + + boolean + + + Specifies whether the selected option should be turned on or off. + You can write TRUE, ON, or + 1 to enable the option, and FALSE, + OFF, or 0 to disable it. The + boolean value can also + be omitted, in which case TRUE is assumed. + + + + table_name diff --git a/doc/src/sgml/release-12.sgml b/doc/src/sgml/release-12.sgml index d80d89e6a2..90999410db 100644 --- a/doc/src/sgml/release-12.sgml +++ b/doc/src/sgml/release-12.sgml @@ -1983,8 +1983,8 @@ Author: Robert Haas --> - Allow VACUUM to take optional boolean argument - specifications (Masahiko Sawada) + Allow VACUUM and ANALYZE + to take optional boolean argument specifications (Masahiko Sawada) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e4c03de221..d77aa2936d 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2101,6 +2101,8 @@ psql_completion(const char *text, int start, int end) */ if (ends_with(prev_wd, '(') || ends_with(prev_wd, ',')) COMPLETE_WITH("VERBOSE", "SKIP_LOCKED"); + else if (TailMatches("VERBOSE|SKIP_LOCKED")) + COMPLETE_WITH("ON", "OFF"); } else if (HeadMatches("ANALYZE") && TailMatches("(")) /* "ANALYZE (" should be caught above, so assume we want columns */