]> granicus.if.org Git - postgresql/commitdiff
Fix busted tab-completion pattern for ALTER TABLE t ALTER c DROP ...
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Nov 2016 16:51:30 +0000 (11:51 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Nov 2016 16:51:35 +0000 (11:51 -0500)
Evidently a thinko in commit 9b181b036.

Kyotaro Horiguchi

src/bin/psql/tab-complete.c

index 8469d9ff03deae4388569a66a128e91f6619a05e..4cf208e16be468330ade0be50f0db0717cf9c497 100644 (file)
@@ -1736,7 +1736,7 @@ psql_completion(const char *text, int start, int end)
                COMPLETE_WITH_LIST4("PLAIN", "EXTERNAL", "EXTENDED", "MAIN");
        /* ALTER TABLE ALTER [COLUMN] <foo> DROP */
        else if (Matches7("ALTER", "TABLE", MatchAny, "ALTER", "COLUMN", MatchAny, "DROP") ||
-                        Matches8("ALTER", "TABLE", MatchAny, "TABLE", MatchAny, "ALTER", MatchAny, "DROP"))
+                        Matches6("ALTER", "TABLE", MatchAny, "ALTER", MatchAny, "DROP"))
                COMPLETE_WITH_LIST2("DEFAULT", "NOT NULL");
        else if (Matches4("ALTER", "TABLE", MatchAny, "CLUSTER"))
                COMPLETE_WITH_CONST("ON");