mirror of
https://github.com/postgres/postgres.git
synced 2025-06-02 00:01:40 -04:00
psql: Improve tab completion of WITH
Only match when WITH is the first word, as WITH may appear in many other contexts. Josh Kupershmidt
This commit is contained in:
parent
0d9819f7e3
commit
6b8c99c386
@ -2842,7 +2842,10 @@ psql_completion(char *text, int start, int end)
|
|||||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
|
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
|
||||||
|
|
||||||
/* WITH [RECURSIVE] */
|
/* WITH [RECURSIVE] */
|
||||||
else if (pg_strcasecmp(prev_wd, "WITH") == 0)
|
/* Only match when WITH is the first word, as WITH may appear in many other
|
||||||
|
contexts. */
|
||||||
|
else if (pg_strcasecmp(prev_wd, "WITH") == 0 &&
|
||||||
|
prev2_wd[0] == '\0')
|
||||||
COMPLETE_WITH_CONST("RECURSIVE");
|
COMPLETE_WITH_CONST("RECURSIVE");
|
||||||
|
|
||||||
/* ANALYZE */
|
/* ANALYZE */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user