]> 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:30 +0000 (11:51 -0500)
Evidently a thinko in commit 9b181b036.

Kyotaro Horiguchi

src/bin/psql/tab-complete.c

index b556c00b3154af7bb5248c6854d9c7ac8a4e1bf2..6aa3f20e1377efb8d4e50bc49a9e8b27841ba82a 100644 (file)
@@ -1804,7 +1804,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");