postgres.git / summary / log / commit / refs

commit    2800fbb2b793fcb45d9d72ca60f7534722ebc4cd
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Wed May 01 02:59:14 2024 +0000
First released in: 17.0

    Add tab completion for EXPLAIN (MEMORY|SERIALIZE)
    
    SERIALIZE has been added in 06286709ee06, and MEMORY in 5de890e3610d.
    
    Author: Jian He
    Discussion: https://postgr.es/m/CACJufxH5UbhbCg-oMt7pHOmvNABF2x48Jfefu24FexSqVgzA3g@mail.gmail.com


src/bin/psql/tab-complete.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 97cd5d9f628..d453e224d93 100644 --- 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"); } [parent: a63224be49b8]