On Friday, May 2, 2014, Jeff Janes <jeff.ja...@gmail.com> wrote: > I've been working with an app that uses a schema name whose spelling is > hard to type, and the lack of tab completion for "SET search_path TO" was > bugging me. So see attached. > > I filter out the system schemata, but not public. > > For commit fest next. >
Once more, with attachment.... Cheers, Jeff
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c new file mode 100644 index 6d26ffc..dec3d4a *** a/src/bin/psql/tab-complete.c --- b/src/bin/psql/tab-complete.c *************** psql_completion(const char *text, int st *** 3230,3235 **** --- 3230,3242 ---- COMPLETE_WITH_LIST(my_list); } + else if (pg_strcasecmp(prev2_wd, "search_path") == 0) + { + COMPLETE_WITH_QUERY(Query_for_list_of_schemas + " AND nspname not like 'pg\\_%%' " + " AND nspname not like 'information_schema' " + " UNION SELECT 'DEFAULT' "); + } else { static const char *const my_list[] =
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers