execute-completion-2.diff
text/x-patch
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 abf9bc7..ee63198 *** a/src/bin/psql/tab-complete.c --- b/src/bin/psql/tab-complete.c *************** static const SchemaQuery Query_for_list_ *** 588,593 **** --- 588,598 ---- " FROM pg_catalog.pg_available_extensions "\ " WHERE substring(pg_catalog.quote_ident(name),1,%d)='%s' AND installed_version IS NULL" + #define Query_for_list_of_prepared_statements \ + " SELECT pg_catalog.quote_ident(name) "\ + " FROM pg_catalog.pg_prepared_statements "\ + " WHERE substring(pg_catalog.quote_ident(name),1,%d)='%s'" + /* * This is a list of all "things" in Pgsql, which can show up after CREATE or * DROP; and there is also a query to get a list of them. *************** psql_completion(char *text, int start, i *** 1640,1645 **** --- 1645,1656 ---- COMPLETE_WITH_LIST(list_CSV); } + /* EXECUTE */ + /* must not match CREATE TRIGGER ... EXECUTE PROCEDURE */ + else if (pg_strcasecmp(prev_wd, "EXECUTE") == 0 && + prev2_wd[0] == '\0') + COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements); + /* CREATE DATABASE */ else if (pg_strcasecmp(prev3_wd, "CREATE") == 0 && pg_strcasecmp(prev2_wd, "DATABASE") == 0)