diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e00dbab5aa..5d7f24e57a 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3577,7 +3577,7 @@ psql_completion(const char *text, int start, int end) /* WHERE */ /* Simple case of the word before the where being the table name */ - else if (TailMatches(MatchAny, "WHERE")) + else if (TailMatches("WHERE", MatchAny)) COMPLETE_WITH_ATTR(prev2_wd, ""); /* ... FROM ... */