From 5b51bbfbd52a444a490247e66751d6a47d2ba7dd Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sat, 13 Jul 2019 15:56:20 +1200 Subject: [PATCH] Fix tab completion for UPDATE. Previously it suggested an extra "=" after "SET x=". Reported-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/CA%2BhUKGLk%3D0yLDjfviONJLzcHEzygj%3Dx6VbGH43LnXbBUvQb52g%40mail.gmail.com --- src/bin/psql/tab-complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 9b9202e84c..3f7001fb69 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3487,7 +3487,7 @@ psql_completion(const char *text, int start, int end) else if (TailMatches("UPDATE", MatchAny, "SET")) COMPLETE_WITH_ATTR(prev2_wd, ""); /* UPDATE SET = */ - else if (TailMatches("UPDATE", MatchAny, "SET", MatchAny)) + else if (TailMatches("UPDATE", MatchAny, "SET", MatchAnyExcept("*="))) COMPLETE_WITH("="); /* USER MAPPING */ -- 2.40.0