]> granicus.if.org Git - postgresql/commitdiff
Add tab completion for EXPLAIN (SETTINGS) in psql
authorMichael Paquier <michael@paquier.xyz>
Fri, 27 Sep 2019 03:53:43 +0000 (12:53 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 27 Sep 2019 03:53:43 +0000 (12:53 +0900)
Author: Justin Pryzby
Reviewed-by: Tatsuro Yamada
Discussion: https://postgr.es/m/20190927022051.GC24334@telsasoft.com
Backpatch-through: 12

src/bin/psql/tab-complete.c

index cb1266827645a7f155d6e48924556dbc3569d88d..e00dbab5aa1bd40ad1e3784e2dc5dd9c061da6dc 100644 (file)
@@ -2939,9 +2939,9 @@ psql_completion(const char *text, int start, int end)
                 * one word, so the above test is correct.
                 */
                if (ends_with(prev_wd, '(') || ends_with(prev_wd, ','))
-                       COMPLETE_WITH("ANALYZE", "VERBOSE", "COSTS", "BUFFERS",
-                                                 "TIMING", "SUMMARY", "FORMAT");
-               else if (TailMatches("ANALYZE|VERBOSE|COSTS|BUFFERS|TIMING|SUMMARY"))
+                       COMPLETE_WITH("ANALYZE", "VERBOSE", "COSTS", "SETTINGS",
+                                                 "BUFFERS", "TIMING", "SUMMARY", "FORMAT");
+               else if (TailMatches("ANALYZE|VERBOSE|COSTS|SETTINGS|BUFFERS|TIMING|SUMMARY"))
                        COMPLETE_WITH("ON", "OFF");
                else if (TailMatches("FORMAT"))
                        COMPLETE_WITH("TEXT", "XML", "JSON", "YAML");