overeager_with.diff
application/octet-stream
Filename: overeager_with.diff
Type: application/octet-stream
Part: 0
Message:
psql: tab completions for 'WITH'
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/tab-complete.c | 0 | 0 |
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
new file mode 100644
index 975d655..8ad5c4c
*** a/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
*************** psql_completion(char *text, int start, i
*** 2826,2833 ****
pg_strcasecmp(prev2_wd, "ANALYZE") == 0))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
! /* WITH [RECURSIVE] */
! else if (pg_strcasecmp(prev_wd, "WITH") == 0)
COMPLETE_WITH_CONST("RECURSIVE");
/* ANALYZE */
--- 2835,2845 ----
pg_strcasecmp(prev2_wd, "ANALYZE") == 0))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
! /* WITH [RECURSIVE]. Only match when WITH is the first word, as WITH
! may appear in various other contexts e.g. ALTER ROLE.
! */
! else if (pg_strcasecmp(prev_wd, "WITH") == 0 &&
! prev2_wd[0] == '\0')
COMPLETE_WITH_CONST("RECURSIVE");
/* ANALYZE */