tab-complete.patch

text/plain

Filename: tab-complete.patch
Type: text/plain
Part: 0
Message: psql tab-complete

Patch

Format: unified
File+
src/bin/psql/tab-complete.c 1 1
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 ... */