At Thu, 18 Nov 2021 17:17:25 +0900, Michael Paquier <mich...@paquier.xyz> wrote 
in 
> On Thu, Nov 18, 2021 at 04:25:30PM +0900, Ken Kato wrote:
> > 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?
> 
> That looks fine per se.

FWIW, I would be a bit perplexed to see type names suggested in
upper-cases, even if it is acceptable by the parser.  If you type-in
the following phrase:

=# type boo<tab>

it is completed to "boolean" but,

=# type BOO<tab>

doesn't respond.

So we could use COMPLETE_WITH_CS instead so that CREATE SEQUENCE
behavess the same way with the existing behavior of TYPE.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to