diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-08-18 12:49:04 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-08-18 12:50:28 -0400 |
commit | f25087d26aa9c63ce90cd8e87131b6dbe943ba86 (patch) | |
tree | affb7d7e1b17a716edf92032285a887ff1d3821b | |
parent | 2c5c11ae9e0c5f4605fb9cdd2e8bd94fe0a06d95 (diff) | |
download | postgresql-f25087d26aa9c63ce90cd8e87131b6dbe943ba86.tar.gz postgresql-f25087d26aa9c63ce90cd8e87131b6dbe943ba86.zip |
psql: Make EXECUTE PROCEDURE tab completion a bit narrower.
If the user has typed GRANT EXECUTE, the correct completion is "ON",
not "PROCEDURE".
Daniel Verite
-rw-r--r-- | src/bin/psql/tab-complete.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 4369d89e812..77af953003b 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2593,6 +2593,7 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL); /* complete CREATE TRIGGER ... EXECUTE with PROCEDURE */ else if (pg_strcasecmp(prev_wd, "EXECUTE") == 0 && + !(pg_strcasecmp(prev2_wd, "GRANT") == 0 && prev3_wd[0] == '\0') && prev2_wd[0] != '\0') COMPLETE_WITH_CONST("PROCEDURE"); |