Re: Making tab-complete.c easier to maintain
От | Thomas Munro |
---|---|
Тема | Re: Making tab-complete.c easier to maintain |
Дата | |
Msg-id | CAEepm=1x-inE_3Hsa07Wp5zDg2puGR1TdJsstgm0=ATXpxur=Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Making tab-complete.c easier to maintain (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Making tab-complete.c easier to maintain
|
Список | pgsql-hackers |
On Sun, Dec 13, 2015 at 1:08 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Wed, Dec 9, 2015 at 8:17 PM, Thomas Munro wrote: >> Thanks for looking at this Michael. It's probably not much fun to >> review! Here is a new version with that bit removed. More responses >> inline below. > > Could this patch be rebased? There are now conflicts with 8b469bd7 and > it does not apply cleanly. New version attached. I've also add (very) primitive negative pattern support and used it in 5 places. Improvement? Examples: /* ALTER TABLE xxx RENAME yyy */ - else if (TailMatches5("ALTER", "TABLE", MatchAny, "RENAME", MatchAny) && - !TailMatches1("CONSTRAINT|TO")) + else if (TailMatches5("ALTER", "TABLE", MatchAny, "RENAME", "!CONSTRAINT|TO")) COMPLETE_WITH_CONST("TO"); /* If we have CLUSTER <sth>, then add "USING" */ - else if (TailMatches2("CLUSTER", MatchAny) && !TailMatches1("VERBOSE|ON")) + else if (TailMatches2("CLUSTER", "!VERBOSE|ON")) COMPLETE_WITH_CONST("USING"); -- Thomas Munro http://www.enterprisedb.com
Вложения
В списке pgsql-hackers по дате отправления: