On Tue, Jun 7, 2016 at 7:35 AM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote:
> In looking at the DROP ACCESS METHOD completion I noticed that the
> words_after_create gadget is a bit buggy: for things with more than one
> word in the thing name (such as MATERIALIZED VIEW, USER MAPPING FOR,
> EVENT TRIGGER among others) the "query/squery"-based completion isn't
> triggered, because the loop at the end of psql_completion only considers
> a single word (using strcmp against prev_wd), which obviously doesn't
> match the multiple-word specifier in the struct.  Some things such as
> EVENT TRIGGER and MATERIALIZED VIEW have specialized code that does the
> actual work; the latter specifies a query in words_after_create, but
> it's dead code.  As a probably separate but related bug, CREATE USER
> MAPPING FOR stops working after you tab-complete the USER in it.

Yes, that's not new...

> Lastly, there is an entry for CONFIGURATION which also doesn't work:
> if you enter "DROP <tab>" it doesn't complete CONFIGURATION, but if you
> enter "DROP CONFIGURATION <tab>" then it shows a list of text search
> configurations, which is not a valid command.

This is not a new issue as well. Even before the tab completion
refactoring things are behaving this way. There is much room for
improvements. The refactoring makes back-patching a bit more
difficult, so we may just want to get those improvements in 9.6~ based
on the lack of complaints regarding that.

> To conclude, so far as I can tell, your patch (for DROP AM completion)
> is fine, but the existing code has some minor flags which we could just
> as well ignore for now, but could be improved in the future.


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to