Thread

Commits

  1. Tab completion: offer parens as appropriate in CREATE/ALTER TEXT SEARCH.

  1. ALTER TEXT SEARCH DICTIONARY tab completion

    Jeff Janes <jeff.janes@gmail.com> — 2020-02-27T20:27:21Z

    "ALTER TEXT SEARCH DICTIONARY foobar" can be followed by an open
    parenthesis, but that is not offered in tab completion.  That is useful,
    because otherwise I have to look up the docs to see if I need a SET or
    OPTION(S) or WITH or something before it, just to discover I don't.
    
    The attached one-line patch adds "(".
    
    We can't go beyond that, as available options for each dictionary are not
    known in advance.
    
    Cheers,
    
    Jeff
    
  2. Re: ALTER TEXT SEARCH DICTIONARY tab completion

    gkokolatos@pm.me — 2020-03-04T15:02:58Z

    The following review has been posted through the commitfest application:
    make installcheck-world:  not tested
    Implements feature:       not tested
    Spec compliant:           not tested
    Documentation:            not tested
    
    It looks good and does what it says on the tin.
    
    One minor nitpick I feel I should add is that for completeness and
    balance the equivalent `CREATE TEXT SEARCH DICTIONARY` should 
    get the same treatment.
    
    Maybe something along the lines of:
    -       else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION", MatchAny))
    +       else if (Matches("CREATE", "TEXT", "SEARCH", "DICTIONARY|CONFIGURATION", MatchAny))
  3. Re: ALTER TEXT SEARCH DICTIONARY tab completion

    Tom Lane <tgl@sss.pgh.pa.us> — 2020-03-07T22:00:50Z

    Georgios Kokolatos <gkokolatos@pm.me> writes:
    > One minor nitpick I feel I should add is that for completeness and
    > balance the equivalent `CREATE TEXT SEARCH DICTIONARY` should
    > get the same treatment.
    
    > Maybe something along the lines of:
    > -       else if (Matches("CREATE", "TEXT", "SEARCH", "CONFIGURATION", MatchAny))
    > +       else if (Matches("CREATE", "TEXT", "SEARCH", "DICTIONARY|CONFIGURATION", MatchAny))
    
    Agreed; actually all four CREATE TEXT SEARCH commands could do that.
    I pushed it as attached.
    
    			regards, tom lane