Skip to content

Commit f25087d

Browse files
committed
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
1 parent 2c5c11a commit f25087d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/psql/tab-complete.c

+1
Original file line numberDiff line numberDiff line change
@@ -2593,6 +2593,7 @@ psql_completion(const char *text, int start, int end)
25932593
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
25942594
/* complete CREATE TRIGGER ... EXECUTE with PROCEDURE */
25952595
else if (pg_strcasecmp(prev_wd, "EXECUTE") == 0 &&
2596+
!(pg_strcasecmp(prev2_wd, "GRANT") == 0 && prev3_wd[0] == '\0') &&
25962597
prev2_wd[0] != '\0')
25972598
COMPLETE_WITH_CONST("PROCEDURE");
25982599

0 commit comments

Comments
 (0)