Add tab-completion for CREATE FOREIGN TABLE.
Unlike CREATE TABLE, CREATE FOREIGN TABLE is not allowed inside CREATE SCHEMA, so Matches() is used instead of TailMatches() for the tab-completion. Author: Tang <tanghy.fnst@fujitsu.com> Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/OS0PR01MB61137E96E0551278782D11CDFB519@OS0PR01MB6113.jpnprd01.prod.outlook.com
This commit is contained in:
parent
36c4bc6e72
commit
74527c3e02
@ -2636,6 +2636,10 @@ psql_completion(const char *text, int start, int end)
|
||||
else if (Matches("CREATE", "FOREIGN", "DATA", "WRAPPER", MatchAny))
|
||||
COMPLETE_WITH("HANDLER", "VALIDATOR", "OPTIONS");
|
||||
|
||||
/* CREATE FOREIGN TABLE */
|
||||
else if (Matches("CREATE", "FOREIGN", "TABLE", MatchAny))
|
||||
COMPLETE_WITH("(", "PARTITION OF");
|
||||
|
||||
/* CREATE INDEX --- is allowed inside CREATE SCHEMA, so use TailMatches */
|
||||
/* First off we complete CREATE UNIQUE with "INDEX" */
|
||||
else if (TailMatches("CREATE", "UNIQUE"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user