1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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
This commit is contained in:
Robert Haas
2015-08-18 12:49:04 -04:00
parent 2c5c11ae9e
commit f25087d26a

View File

@ -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");