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:
@@ -3204,7 +3204,7 @@ match_previous_words(int pattern_id,
|
|||||||
COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_tables, "(");
|
COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_tables, "(");
|
||||||
/* Complete COPY ( with legal query commands */
|
/* Complete COPY ( with legal query commands */
|
||||||
else if (Matches("COPY|\\copy", "("))
|
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> */
|
/* Complete COPY <sth> */
|
||||||
else if (Matches("COPY|\\copy", MatchAny))
|
else if (Matches("COPY|\\copy", MatchAny))
|
||||||
COMPLETE_WITH("FROM", "TO");
|
COMPLETE_WITH("FROM", "TO");
|
||||||
|
Reference in New Issue
Block a user