Re: Improve tab completion for REFRESH MATERIALIZED VIEW - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Improve tab completion for REFRESH MATERIALIZED VIEW
Date
Msg-id CAB7nPqSa69XkoeszZYDDx1SFyeNM=ONzTgdgSoX+yPLNiCckxQ@mail.gmail.com
Whole thread Raw
In response to Re: Improve tab completion for REFRESH MATERIALIZED VIEW  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Wed, Jan 27, 2016 at 11:41 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> But ISTM that CREATE MATERIALIZED VIEW <tab> doesn't list
> existing matviews yet. What's worse it lists existing *views*.

Yep.

> This happens because words_after_create mechanism doesn't support
> the case where the keyword has more than one words like "MATERIALIZED VIEW".

Having worked on that, I am not convinced this is worth the complication.

> Probably we should improve that mechanism so that even multiple words can be
> handled. Or we should just add something like the following.
>
>        /* Complete CREATE MATERIALIZED VIEW with <name> */
> +       else if (Matches3("CREATE", "MATERIALIZED", "VIEW"))
> +               COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_matviews, NULL);

Indeed, we do the same for tables and views as well. That would be fine.
-- 
Michael



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Improve tab completion for REFRESH MATERIALIZED VIEW
Next
From: Fujii Masao
Date:
Subject: Re: brin_summarize_new_values error checking