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

Commit95787e8

Browse files
committed
Tab-complete ALTER PUBLICATION ADD TABLE with list of tables
This has been posted as part of the column-list feature for logicalreplication since [1], but it's not really related to that.[1]https://postgr.es/m/202112131747.cmlstdewm4kh@alvherre.pgsql
1 parent82331ed commit95787e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,6 +1692,12 @@ psql_completion(const char *text, int start, int end)
16921692
/* ALTER PUBLICATION <name> ADD */
16931693
elseif (Matches("ALTER","PUBLICATION",MatchAny,"ADD"))
16941694
COMPLETE_WITH("ALL TABLES IN SCHEMA","TABLE");
1695+
elseif (Matches("ALTER","PUBLICATION",MatchAny,"ADD|SET","TABLE")||
1696+
(HeadMatches("ALTER","PUBLICATION",MatchAny,"ADD|SET","TABLE")&&
1697+
ends_with(prev_wd,',')))
1698+
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);
1699+
elseif (HeadMatches("ALTER","PUBLICATION",MatchAny,"ADD|SET","TABLE"))
1700+
COMPLETE_WITH(",");
16951701
/* ALTER PUBLICATION <name> DROP */
16961702
elseif (Matches("ALTER","PUBLICATION",MatchAny,"DROP"))
16971703
COMPLETE_WITH("ALL TABLES IN SCHEMA","TABLE");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp