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

Commit6b8c99c

Browse files
committed
psql: Improve tab completion of WITH
Only match when WITH is the first word, as WITH may appear in manyother contexts.Josh Kupershmidt
1 parent0d9819f commit6b8c99c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,10 @@ psql_completion(char *text, int start, int end)
28422842
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables,NULL);
28432843

28442844
/* WITH [RECURSIVE] */
2845-
elseif (pg_strcasecmp(prev_wd,"WITH")==0)
2845+
/* Only match when WITH is the first word, as WITH may appear in many other
2846+
contexts. */
2847+
elseif (pg_strcasecmp(prev_wd,"WITH")==0&&
2848+
prev2_wd[0]=='\0')
28462849
COMPLETE_WITH_CONST("RECURSIVE");
28472850

28482851
/* ANALYZE */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp