]> granicus.if.org Git - postgresql/commitdiff
Fix tab completion for ALTER LANGUAGE in psql
authorMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 05:27:20 +0000 (14:27 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 05:27:20 +0000 (14:27 +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 3f7001fb696af2a11ab7bcd3d7834a0f0cf21147..d40800709b0fd136d391fec16701503a7f67796d 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))