projects
/
postgres-xl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c5c11a
)
psql: Make EXECUTE PROCEDURE tab completion a bit narrower.
author
Robert Haas
<
[email protected]
>
Tue, 18 Aug 2015 16:49:04 +0000
(12:49 -0400)
committer
Robert Haas
<
[email protected]
>
Tue, 18 Aug 2015 16:50:28 +0000
(12:50 -0400)
If the user has typed GRANT EXECUTE, the correct completion is "ON",
not "PROCEDURE".
Daniel Verite
src/bin/psql/tab-complete.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/tab-complete.c
b/src/bin/psql/tab-complete.c
index 4369d89e81247ffebb5784b229f18a5ab0d071bd..77af953003b1a64f6601047fed8993fb3136a1ab 100644
(file)
--- 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");