From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tab completion of IMPORT FOREIGN SCHEMA |
Date: | 2020-08-17 05:15:34 |
Message-ID: | 20200817051534.GC7787@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Aug 09, 2020 at 12:33:43PM -0400, Tom Lane wrote:
> I don't see how psql could obtain a "real" list of foreign schemas
> from an arbitrary FDW, even if it magically knew which server the
> user would specify later in the command. So this behavior seems fine.
> It has some usefulness, while not completing at all would have none.
Sounds fine to me as well. The LIMIT TO and EXCEPT clauses are
optional, so using TailMatches() looks fine.
+ else if (TailMatches("FROM", "SERVER", MatchAny, "INTO", MatchAny))
+ COMPLETE_WITH("OPTIONS")
Shouldn't you complete with "OPTIONS (" here?
It would be good to complete with "FROM SERVER" after specifying
EXCEPT or LIMIT TO, you can just use "(*)" to include the list of
tables in the list of elements checked.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-08-17 05:29:03 | Re: Fix an old description in high-availability.sgml |
Previous Message | Amul Sul | 2020-08-17 04:37:38 | Re: new heapcheck contrib module |