Skip to content

Commit 74527c3

Browse files
committed
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
1 parent 36c4bc6 commit 74527c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,6 +2636,10 @@ psql_completion(const char *text, int start, int end)
26362636
else if (Matches("CREATE", "FOREIGN", "DATA", "WRAPPER", MatchAny))
26372637
COMPLETE_WITH("HANDLER", "VALIDATOR", "OPTIONS");
26382638

2639+
/* CREATE FOREIGN TABLE */
2640+
else if (Matches("CREATE", "FOREIGN", "TABLE", MatchAny))
2641+
COMPLETE_WITH("(", "PARTITION OF");
2642+
26392643
/* CREATE INDEX --- is allowed inside CREATE SCHEMA, so use TailMatches */
26402644
/* First off we complete CREATE UNIQUE with "INDEX" */
26412645
else if (TailMatches("CREATE", "UNIQUE"))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy