Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb0c0662

Browse files
committed
Improve tab-completion for CREATE PUBLICATION.
Author: Peter SmithReviewed-by: Vignesh CDiscussion:https://postgr.es/m/CAHut+Ps-vkmnWAShWSRVCB3gx8aM=bFoDqWgBNTzofK0q1LpwA@mail.gmail.com
1 parent590ecd9 commitb0c0662

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,8 +2691,13 @@ psql_completion(const char *text, int start, int end)
26912691
COMPLETE_WITH("FOR TABLE","FOR ALL TABLES","WITH (");
26922692
elseif (Matches("CREATE","PUBLICATION",MatchAny,"FOR"))
26932693
COMPLETE_WITH("TABLE","ALL TABLES");
2694-
/* Complete "CREATE PUBLICATION <name> FOR TABLE <table>, ..." */
2695-
elseif (HeadMatches("CREATE","PUBLICATION",MatchAny,"FOR","TABLE"))
2694+
elseif (Matches("CREATE","PUBLICATION",MatchAny,"FOR","ALL"))
2695+
COMPLETE_WITH("TABLES");
2696+
elseif (Matches("CREATE","PUBLICATION",MatchAny,"FOR","ALL","TABLES")
2697+
||Matches("CREATE","PUBLICATION",MatchAny,"FOR","TABLE",MatchAny))
2698+
COMPLETE_WITH("WITH (");
2699+
/* Complete "CREATE PUBLICATION <name> FOR TABLE" with "<table>, ..." */
2700+
elseif (Matches("CREATE","PUBLICATION",MatchAny,"FOR","TABLE"))
26962701
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);
26972702
/* Complete "CREATE PUBLICATION <name> [...] WITH" */
26982703
elseif (HeadMatches("CREATE","PUBLICATION")&&TailMatches("WITH","("))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp