postgres.git / summary / log / commit / refs

commit    f25087d26aa9c63ce90cd8e87131b6dbe943ba86
Author:   Robert Haas <rhaas@postgresql.org>
Date:     Tue Aug 18 16:49:04 2015 +0000
First released in: 9.6.0, 9.5.0

    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


src/bin/psql/tab-complete.c | 1 + 1 file changed, 1 insertion(+) 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"); [parent: 2c5c11ae9e0c]