Re: Feature: temporary materialized views - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: Feature: temporary materialized views
Date
Msg-id 1f0d1755-2a79-5a40-a100-5dd6c22dc8cc@proxel.se
Whole thread Raw
In response to Re: Feature: temporary materialized views  (Mitar <mmitar@gmail.com>)
List pgsql-hackers
On 1/18/19 8:32 PM, Mitar wrote:
> On Fri, Jan 18, 2019 at 7:18 AM Andreas Karlsson <andreas@proxel.se> wrote:
>> These rules are usually pretty easy to add. Just take a look in
>> src/bin/psql/tab-complete.c to see how it is usually done.
> 
> Thanks. I have added the auto-complete and attached a new patch.

Hm, I do not think we should complete UNLOGGED MATERIALIZED VIEW even 
though it is valid syntax. If you try to create one you will just get an 
error. I am leaning towards removing the existing completion for this, 
because I do not see the point of completing to useless but technically 
valid syntax.

This is the one I think we should probably remove:

      else if (TailMatches("CREATE", "UNLOGGED"))
          COMPLETE_WITH("TABLE", "MATERIALIZED VIEW");

>> I might take a stab at refactoring this myself this weekend. Hopefully
>> it is not too involved.
> 
> That would be great! I can afterwards update the patch accordingly.

I have submitted a first shot at this. Let's see what others think of my 
patch.

Andreas


pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: PostgreSQL vs SQL/XML Standards
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Thread-unsafe coding in ecpg