Re: COMMENT ON, psql and access methods
От | Michael Paquier |
---|---|
Тема | Re: COMMENT ON, psql and access methods |
Дата | |
Msg-id | CAB7nPqQsChYpMOAyCi6TdzTu1yUq_QmoZNVto8aTSmgavEnxvQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: COMMENT ON, psql and access methods (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Список | pgsql-hackers |
On Tue, Jun 7, 2016 at 7:35 AM, Alvaro Herrera <alvherre@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. Thanks! -- Michael
В списке pgsql-hackers по дате отправления: