git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a63224b)
Add tab completion for EXPLAIN (MEMORY|SERIALIZE)
Wed, 1 May 2024 02:59:14 +0000 (11:59 +0900)
Wed, 1 May 2024 02:59:14 +0000 (11:59 +0900)
SERIALIZE has been added in 06286709ee06, and MEMORY in 5de890e3610d.

Author: Jian He
Discussion: https://postgr.es/m/CACJufxH5UbhbCg-oMt7pHOmvNABF2x48Jfefu24FexSqVgzA3g@mail.gmail.com


diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 97cd5d9f6281e9996debd1fca9a7e4af30b5cc6a..d453e224d93301a696b79cbdb6ca3d307093332e 100644 (file)
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3870,9 +3870,12 @@ psql_completion(const char *text, int start, int end)
*/
if (ends_with(prev_wd, '(') || ends_with(prev_wd, ','))
COMPLETE_WITH("ANALYZE", "VERBOSE", "COSTS", "SETTINGS", "GENERIC_PLAN",
- "BUFFERS", "WAL", "TIMING", "SUMMARY", "FORMAT");
- else if (TailMatches("ANALYZE|VERBOSE|COSTS|SETTINGS|GENERIC_PLAN|BUFFERS|WAL|TIMING|SUMMARY"))
+ "BUFFERS", "SERIALIZE", "WAL", "TIMING", "SUMMARY",
+ "MEMORY", "FORMAT");
+ else if (TailMatches("ANALYZE|VERBOSE|COSTS|SETTINGS|GENERIC_PLAN|BUFFERS|WAL|TIMING|SUMMARY|MEMORY"))
COMPLETE_WITH("ON", "OFF");
+ else if (TailMatches("SERIALIZE"))
+ COMPLETE_WITH("TEXT", "NONE", "BINARY");
else if (TailMatches("FORMAT"))
COMPLETE_WITH("TEXT", "XML", "JSON", "YAML");
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /