Re: [PATCH] Improve tab completion for CREATE TABLE
От | Michael Paquier |
---|---|
Тема | Re: [PATCH] Improve tab completion for CREATE TABLE |
Дата | |
Msg-id | 20181219050530.GC19856@paquier.xyz обсуждение исходный текст |
Ответ на | Re: [PATCH] Improve tab completion for CREATE TABLE (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)) |
Ответы |
Re: [PATCH] Improve tab completion for CREATE TABLE
|
Список | pgsql-hackers |
On Fri, Nov 30, 2018 at 03:44:38PM +0000, Dagfinn Ilmari Mannsåker wrote: > ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes: >> Please find attached a patch that adds the following tab completions for >> CREATE TABLE: > > Added to the 2019-01 commitfest: https://commitfest.postgresql.org/21/1895/ + else if (TailMatches("CREATE", "TABLE", MatchAny) || + TailMatches("CREATE", "TEMP|TEMPORARY|UNLOGGED", "TABLE", MatchAny)) + COMPLETE_WITH("(", "PARTITION OF"); This is missing the completion of "OF TYPE" (no need to print the type matches). + else if (TailMatches("CREATE", "TABLE", MatchAny, "(*)") || + TailMatches("CREATE", "UNLOGGED", "TABLE", MatchAny, "(*)")) + COMPLETE_WITH("INHERITS (", "PARTITION BY", "WITH (", "TABLESPACE") Temporary tables can be part of a partition tree, with the parent being temporary or permanent. + /* Complete ON COMMIT actions for temp tables */ + else if (TailMatches("ON", "COMMIT")) + COMPLETE_WITH("PRESERVE ROWS", "DELETE ROWS", "DROP"); This causes ON COMMIT to show up for permanent and unlogged tables. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: