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

Commitd1ce4ed

Browse files
committed
Use wildcard to match parens after CREATE STATISTICS
CREATE STATISTICS completion was checking manually for the start and endof the parenthesised list of types. That works, but we now have a betterway to do that as commit121213d taught word_matches() to allow '*' inthe middle of an alternative. But it only applied that to tab completionfor EXPLAIN, ANALYZE and VACUUM. Use it for CREATE STATISTICS too.Author: Dagfinn Ilmari MannsåkerDiscussion:https://www.postgresql.org/message-id/flat/d8jwooziy1s.fsf%40dalvik.ping.uio.no
1 parentd67dae0 commitd1ce4ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,9 +2390,7 @@ psql_completion(const char *text, int start, int end)
23902390
COMPLETE_WITH("(","ON");
23912391
elseif (Matches("CREATE","STATISTICS",MatchAny,"("))
23922392
COMPLETE_WITH("ndistinct","dependencies");
2393-
elseif (HeadMatches("CREATE","STATISTICS",MatchAny)&&
2394-
previous_words[0][0]=='('&&
2395-
previous_words[0][strlen(previous_words[0])-1]==')')
2393+
elseif (Matches("CREATE","STATISTICS",MatchAny,"(*)"))
23962394
COMPLETE_WITH("ON");
23972395
elseif (HeadMatches("CREATE","STATISTICS",MatchAny)&&
23982396
TailMatches("FROM"))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp