--On 3. Mai 2014 10:11:33 +0200 Andres Freund <and...@2ndquadrant.com> wrote:

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 ----

+               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 
+               }

Why should we exclude system schemata? That seems more likely to be
confusing than helpful? I can see a point in excluding another backend's
temp tables, but otherwise?

I put my hands on this a while ago, too, but had a different notion in mind, which schema the completion should select. I came up with the following:


Just complete to a schema someone has CREATE or USAGE privs. However, the reason i stopped working on it was that i really want to have a completion to a list of schemas as well and i couldn't figure a good and easy way to do this atm.



Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to