Fix tab completion for ALTER LANGUAGE in psql
authorMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 05:30:05 +0000 (14:30 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 05:30:05 +0000 (14:30 +0900)
OWNER_TO was used for the completion, which is not a supported grammar,
but OWNER TO is.

This error has been introduced by d37b816, so backpatch down to 9.6.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com
Backpatch-through: 9.6

src/bin/psql/tab-complete.c

index 12355348c953f2fff6e9c15e34c57f15c6528fbc..d6e938f115efd3e704ae9a7ced07132bc24a2c40 100644 (file)
@@ -1686,7 +1686,7 @@ psql_completion(const char *text, int start, int end)
 
    /* ALTER LANGUAGE <name> */
    else if (Matches("ALTER", "LANGUAGE", MatchAny))
-       COMPLETE_WITH("OWNER_TO", "RENAME TO");
+       COMPLETE_WITH("OWNER TO", "RENAME TO");
 
    /* ALTER LARGE OBJECT <oid> */
    else if (Matches("ALTER", "LARGE", "OBJECT", MatchAny))