On Wed, Nov 17, 2021 at 10:44:44AM +0900, Ken Kato wrote: > I made a patch for this, so please have a look.
+ else if (Matches("CREATE", "TRANSFORM", "FOR", MatchAny) + COMPLETE_WITH("LANGUAGE") + else if (Matches("CREATE", "TRANSFORM", "FOR", MatchAny, "LANGUAGE") Those three lines are wrong, for two different reasons and three mistakes. You may want to compile your code before sending it :) "CREATE [TEMP|TEMPORARY] SEQUENCE name AS" could be completed with the supported types. There are three of them. + COMPLETE_WITH_QUERY(Query_for_list_of_schemas + " UNION SELECT 'AUTORIZATION'"); Incorrect completion here, s/AUTORIZATION/AUTHORIZATION/. + else if (Matches("CREATE", "CONVERSION", MatchAny)) + COMPLETE_WITH("FOR"); Why didn't you consider DEFAULT for the set of changes with conversions? + else if (Matches("CREATE", "SCHEMA")) + COMPLETE_WITH("AUTHORIZATION", "IF NOT EXISTS"); + else if (Matches("CREATE", "SCHEMA", "IF", "NOT", "EXISTS")) We don't do any completion for INE or IE in the other object types. + /* CREATE LANGUAGE */ + else if (Matches("CREATE", "LANGUAGE", MatchAny)) + COMPLETE_WITH("HANDLER"); + else if (Matches("CREATE", "LANGUAGE", MatchAny, "HANDLER", MatchAny)) + COMPLETE_WITH("INLINE", "VALIDATOR"); It looks like you forgot the case of "OR REPLACE" here? This is done for triggers, for example. -- Michael
signature.asc
Description: PGP signature