diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-16 20:36:35 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-16 20:36:35 -0400 |
commit | c079673dcb7f210617c9fc1470e6bf166d8a2971 (patch) | |
tree | cd8a2c6834da8d1157f11a38cb6272dc48e42dd1 /src/bin/psql/tab-complete.c | |
parent | ddd243584a0f353bbaba260d976cc41b251bbf21 (diff) | |
download | postgresql-c079673dcb7f210617c9fc1470e6bf166d8a2971.tar.gz postgresql-c079673dcb7f210617c9fc1470e6bf166d8a2971.zip |
Preventive maintenance in advance of pgindent run.
Reformat various places in which pgindent will make a mess, and
fix a few small violations of coding style that I happened to notice
while perusing the diffs from a pgindent dry run.
There is one actual bug fix here: the need-to-enlarge-the-buffer code
path in icu_convert_case was obviously broken. Perhaps it's unreachable
in our usage? Or maybe this is just sadly undertested.
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r-- | src/bin/psql/tab-complete.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index b9e3491aeca..c768a48e4d5 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2772,6 +2772,7 @@ psql_completion(const char *text, int start, int end) */ /* Complete GRANT/REVOKE with a list of roles and privileges */ else if (TailMatches1("GRANT|REVOKE")) + { /* * With ALTER DEFAULT PRIVILEGES, restrict completion * to grantable privileges (can't grant roles) @@ -2795,7 +2796,7 @@ psql_completion(const char *text, int start, int end) " UNION SELECT 'EXECUTE'" " UNION SELECT 'USAGE'" " UNION SELECT 'ALL'"); - + } /* * Complete GRANT/REVOKE <privilege> with "ON", GRANT/REVOKE <role> with * TO/FROM @@ -2822,6 +2823,7 @@ psql_completion(const char *text, int start, int end) * privilege. */ else if (TailMatches3("GRANT|REVOKE", MatchAny, "ON")) + { /* * With ALTER DEFAULT PRIVILEGES, restrict completion * to the kinds of objects supported. @@ -2845,11 +2847,10 @@ psql_completion(const char *text, int start, int end) " UNION SELECT 'TABLE'" " UNION SELECT 'TABLESPACE'" " UNION SELECT 'TYPE'"); - + } else if (TailMatches4("GRANT|REVOKE", MatchAny, "ON", "ALL")) COMPLETE_WITH_LIST3("FUNCTIONS IN SCHEMA", "SEQUENCES IN SCHEMA", "TABLES IN SCHEMA"); - else if (TailMatches4("GRANT|REVOKE", MatchAny, "ON", "FOREIGN")) COMPLETE_WITH_LIST2("DATA WRAPPER", "SERVER"); |