Content-Length: 260989 | pFad | http://github.com/postgrespro/postgres/commit/74527c3e022d3ace648340b79a6ddec3419f6732

90 Add tab-completion for CREATE FOREIGN TABLE. · postgrespro/postgres@74527c3 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/74527c3e022d3ace648340b79a6ddec3419f6732

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy