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