Re: CREATE tab completion

Поиск
Список
Период
Сортировка
Искать
От
Ken Kato
Тема
Re: CREATE tab completion
Дата
Msg-id
1e16d01ba570efea94d6d82e4254dc88@oss.nttdata.com
Ответ на
Re: CREATE tab completion (Michael Paquier)
Список
Дерево обсуждения
CREATE tab completion Ken Kato <katouknl@oss.nttdata.com>
Re: CREATE tab completion Michael Paquier <michael@paquier.xyz>
Re: CREATE tab completion Ken Kato <katouknl@oss.nttdata.com>
Re: CREATE tab completion Michael Paquier <michael@paquier.xyz>
Re: CREATE tab completion Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: CREATE tab completion Michael Paquier <michael@paquier.xyz>
Re: CREATE tab completion Ken Kato <katouknl@oss.nttdata.com>
> +       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 :)
> 
> +               COMPLETE_WITH_QUERY(Query_for_list_of_schemas
> +                                                       " UNION SELECT
> 'AUTORIZATION'");
> Incorrect completion here, s/AUTORIZATION/AUTHORIZATION/.

Thank you for the comments.

I am sorry for the compile error and a typo. I will make sure to compile 
before sending it and double check typos.


> "CREATE [TEMP|TEMPORARY] SEQUENCE name AS" could be completed with the
> supported types.  There are three of them.

For this part, I did the following:
+	else if (TailMatches("CREATE", "SEQUENCE", MatchAny, "AS") ||
+			 TailMatches("CREATE", "TEMP|TEMPORARY", "SEQUENCE", MatchAny, 
"AS"))
+		COMPLETE_WITH("smallint", "integer", "bigint");

Am I doing this right? or Are there better ways to do it?


Best wishes,

-- 
Ken Kato
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления
От: osumi.takamichi@fujitsu.com
Дата:
От: Bharath Rupireddy
Дата:
FAQ