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

From Fujii Masao
Subject Re: Improve tab completion for REFRESH MATERIALIZED VIEW
Date
Msg-id CAHGQGwFk2-6NWRnC2trokNhcnjkZH8pTmOG+JQ_HTApM6Mnc0Q@mail.gmail.com
Whole thread Raw
In response to Re: Improve tab completion for REFRESH MATERIALIZED VIEW  (Kevin Grittner <kgrittn@gmail.com>)
Responses Re: Improve tab completion for REFRESH MATERIALIZED VIEW  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Tue, Jan 26, 2016 at 11:49 PM, Kevin Grittner <kgrittn@gmail.com> wrote:
> On Tue, Jan 26, 2016 at 8:43 AM, Kevin Grittner <kgrittn@gmail.com> wrote:
>
>> I will push something shortly with the
>> improvements from both of you, plus a couple other MV tab
>> completion issues I found in testing these patches.
>
> Done.

But ISTM that CREATE MATERIALIZED VIEW <tab> doesn't list
existing matviews yet. What's worse it lists existing *views*.

This happens because words_after_create mechanism doesn't support
the case where the keyword has more than one words like "MATERIALIZED VIEW".
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);


Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: leo
Date:
Subject: Does pglogical support PG 9.4.5?
Next
From: Michael Paquier
Date:
Subject: Re: Improve tab completion for REFRESH MATERIALIZED VIEW