]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
psql: Add tab completion for COPY (MERGE ...
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 28 Nov 2024 08:14:41 +0000 (09:14 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 28 Nov 2024 11:09:53 +0000 (12:09 +0100)
The underlying feature for this was added in PostgreSQL 17.

Author: Jian He <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/CACJufxEmNjxvf1deR1zBrJbjAMeCooooLRzZ+yaaBuqDKh_6-Q@mail.gmail.com

src/bin/psql/tab-complete.c

index 2e55607b8add87bd9193bcc8a9eac7195979459c..1bd01ff865ff52fc51c7f440d4832601bc8b454c 100644 (file)
@@ -2873,7 +2873,7 @@ psql_completion(const char *text, int start, int end)
                COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_tables, "(");
        /* Complete COPY ( with legal query commands */
        else if (Matches("COPY|\\copy", "("))
-               COMPLETE_WITH("SELECT", "TABLE", "VALUES", "INSERT INTO", "UPDATE", "DELETE FROM", "WITH");
+               COMPLETE_WITH("SELECT", "TABLE", "VALUES", "INSERT INTO", "UPDATE", "DELETE FROM", "MERGE INTO", "WITH");
        /* Complete COPY <sth> */
        else if (Matches("COPY|\\copy", MatchAny))
                COMPLETE_WITH("FROM", "TO");