From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
Cc: | Edmund Horner <ejrh00(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: adding tab completions |
Date: | 2018-06-27 20:10:51 |
Message-ID: | 20180627201051.GG3554@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 11, 2018 at 11:35:51PM +0300, Arthur Zakirov wrote:
> IMHO, I'd leave the code as simple as possible. It is up to you of
> course. But it is easy to add completion for a first attribute, by
> adding the condition (and leave other attributes without completion):
>
> else if (HeadMatches1("VACUUM") && TailMatches1("("))
> COMPLETE_WITH_ATTR(prev2_wd, "");
Thanks - I've done this in the attached. It works well for having minimal
logic.
On Tue, Jun 05, 2018 at 05:29:42PM +0300, Arthur Zakirov wrote:
> On Sun, Jun 03, 2018 at 10:39:22PM -0500, Justin Pryzby wrote:
> > else if (HeadMatches1("EXPLAIN") && previous_words_count==2 && prev_wd[0]=='(' && ends_with(prev_wd, ')'))
>
> I think this condition can be replaced by:
>
> else if (TailMatches2("EXPLAIN", MatchAny) && ends_with(prev_wd, ')'))
I used:
else if (HeadMatches2("EXPLAIN", MatchAny) && ends_with(prev_wd, ')'))
> > I've done https://commitfest.postgresql.org/18/1661/
>
> Thank you!
Thanks for your repeated reviews ; if this looks+works fine, please set to
R-F-C.
Actually..another thought: since toast tables may be VACUUM-ed, should I
introduce Query_for_list_of_tpmt ?
Update psql tab completion for commits:
Table completion for ANALYZE partitioned_table
3c3bb99330aa9b4c2f6258bfa0265d806bf365c3
Add parenthesized options syntax for ANALYZE.
854dd8cff523bc17972d34772b0e39ad3d6d46a4
Add VACUUM (DISABLE_PAGE_SKIPPING) for emergencies.
ede62e56fbe809baa1a7bc3873d82f12ffe7540b
Allow multiple tables to be specified in one VACUUM or ANALYZE command.
11d8d72c27a64ea4e30adce11cf6c4f3dd3e60db
Add hash partitioning.
1aba8e651ac3e37e1d2d875842de1e0ed22a651e
Parameter toast_tuple_target
c2513365a0a85e77d3c21adb92fe12cfbe0d1897
Parenthesized explain (...)
d4382c4ae7ea1e272f4fee388aac8ff99421471a
Parameter toast_tuple_target controls TOAST for new rows
c2513365a0a85e77d3c21adb92fe12cfbe0d1897
no longer accepts VACUUM ANALYZE VERBOSE
921059bd66c7fb1230c705d3b1a65940800c4cbb
Justin
Attachment | Content-Type | Size |
---|---|---|
v9-tab-complete-partitions | text/plain | 6.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-06-27 20:11:15 | Re: Allow cancelling VACUUM of nbtrees with corrupted right links |
Previous Message | Peter Geoghegan | 2018-06-27 20:02:25 | Re: Allow cancelling VACUUM of nbtrees with corrupted right links |