--- ./src/bin/psql/tab-complete.c 2018-07-01 21:10:08.000000000 +0800 +++ ../b/src/bin/psql/tab-complete.c 2018-07-02 09:56:12.628148298 +0800 @@ -3400,7 +3400,9 @@ COMPLETE_WITH_CONST("IS"); /* SELECT */ - /* naah . . . */ + /* If we have SELECT , complete it with "FROM" or "INTO" */ + else if (Matches2("SELECT", MatchAny)) + COMPLETE_WITH_LIST2("FROM", "INTO"); /* SET, RESET, SHOW */ /* Complete with a variable name */