projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3eaab3
)
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:09 +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 62cb721cc2559d420a00aeef53e8ca00476d7ab0..816deda1cf81f993bd3cc3a9600d78f073f45c3d 100644
(file)
--- a/
src/bin/psql/tab-complete.c
+++ b/
src/bin/psql/tab-complete.c
@@
-2622,6
+2622,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");