1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-13 18:28:01 +03:00

psql: Add tab completion for COPY (MERGE ...

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
This commit is contained in:
Peter Eisentraut
2024-11-28 09:14:41 +01:00
parent 7f798aca1d
commit 25ec329afa

View File

@@ -3204,7 +3204,7 @@ match_previous_words(int pattern_id,
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");