Hi

we support SET ROLE name and SET ROLE TO name. Second form isn't supported
by tabcomplete. Attached trivial patch fixes it.

Regards

Pavel
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
new file mode 100644
index 750e29d..7110102
*** a/src/bin/psql/tab-complete.c
--- b/src/bin/psql/tab-complete.c
*************** psql_completion(const char *text, int st
*** 3552,3557 ****
--- 3552,3561 ----
  								" AND nspname not like 'pg\\_temp%%' "
  								" UNION SELECT 'DEFAULT' ");
  		}
+ 		else if (pg_strcasecmp(prev2_wd, "role") == 0)
+ 		{
+ 			COMPLETE_WITH_QUERY(Query_for_list_of_roles);
+ 		}
  		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

Reply via email to