Skip to content

Commit db5a703

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 d3eaab3 commit db5a703

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,6 +2622,7 @@ psql_completion(const char *text, int start, int end)
26222622
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
26232623
/* complete CREATE TRIGGER ... EXECUTE with PROCEDURE */
26242624
else if (pg_strcasecmp(prev_wd, "EXECUTE") == 0 &&
2625+
!(pg_strcasecmp(prev2_wd, "GRANT") == 0 && prev3_wd[0] == '\0') &&
26252626
prev2_wd[0] != '\0')
26262627
COMPLETE_WITH_CONST("PROCEDURE");
26272628

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy