Skip to content

Commit db469f0

Browse files
ilmariCommitfest Bot
authored andcommitted
Add tab completion for ALTER FOREIGN TABLE ... SET
The schema is the only thing that can be set for foreign tables.
1 parent 508dfc5 commit db469f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/psql/tab-complete.in.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,6 +2447,10 @@ match_previous_words(int pattern_id,
24472447
COMPLETE_WITH("ADD", "ALTER", "DISABLE TRIGGER", "DROP", "ENABLE",
24482448
"INHERIT", "NO INHERIT", "OPTIONS", "OWNER TO",
24492449
"RENAME", "SET", "VALIDATE CONSTRAINT");
2450+
else if (Matches("ALTER", "FOREIGN", "TABLE", MatchAny, "SET"))
2451+
COMPLETE_WITH("SCHEMA");
2452+
else if (Matches("ALTER", "FOREIGN", "TABLE", MatchAny, "SET", "SCHEMA"))
2453+
COMPLETE_WITH_QUERY(Query_for_list_of_schemas);
24502454

24512455
/* ALTER INDEX */
24522456
else if (Matches("ALTER", "INDEX"))

0 commit comments

Comments
 (0)