Add tab completion for table_rewrite's CREATE EVENT TRIGGER in psql
authorMichael Paquier <[email protected]>
Wed, 25 May 2022 05:21:05 +0000 (14:21 +0900)
committerMichael Paquier <[email protected]>
Wed, 25 May 2022 05:21:05 +0000 (14:21 +0900)
Author: Hou Zhijie
Discussion: https://postgr.es/m/OS0PR01MB5716DEFF787B925C4778228C94D69@OS0PR01MB5716.jpnprd01.prod.outlook.com

src/bin/psql/tab-complete.c

index 55af9eb04e472e307056b594474dfef08a6d7284..e1cc753489921bdd6549ebfdeb8ab7ba336e205b 100644 (file)
@@ -3408,7 +3408,8 @@ psql_completion(const char *text, int start, int end)
        COMPLETE_WITH("ON");
    /* Complete CREATE EVENT TRIGGER <name> ON with event_type */
    else if (Matches("CREATE", "EVENT", "TRIGGER", MatchAny, "ON"))
-       COMPLETE_WITH("ddl_command_start", "ddl_command_end", "sql_drop");
+       COMPLETE_WITH("ddl_command_start", "ddl_command_end", "sql_drop",
+                     "table_rewrite");
 
    /*
     * Complete CREATE EVENT TRIGGER <name> ON <event_type>.  EXECUTE FUNCTION