On 1/18/19 8:32 PM, Mitar wrote:
On Fri, Jan 18, 2019 at 7:18 AM Andreas Karlsson <andr...@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