| From: | Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] psql: Fix REPACK index completion after a column list |
| Date: | 2026-11-11 05:09:50 |
| Message-ID: | CAG7L5+7GiaDZ8uw57XHCsy+tLOcafwh9x3FS1sTw26cyzCbqtg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Chao,
I found a problem:
> ```
> evantest=# repack t (a)USING INDEX ;
> ERROR: ANALYZE option must be specified when a column list is provided
> ```
> After I typed in “(a)”, a tab typing auto filled in “USING INDEX”, but you
> can see the error. A column list is only allowed with ANALYZE specified. So,
> ```
> Matches("REPACK", MatchAny, "(*)")
> ```
> is questionable. It matches to above example.
>
Thanks for catching this. In v3, I've removed the new `USING INDEX`
completion directly after a column list, preserving the existing
behaviour there. I've also removed completion after `REPACK t (a) USING`
and `REPACK t (a) USING INDEX`, since a column list requires `ANALYZE`
to be enabled in the command's option list.
Checking whether that option list enables `ANALYZE` adds
enough complexity that I'd prefer to handle it in a separate patch.
V3 retains the fixes for completing `INDEX` after an explicitly typed
`USING` and looking up the correct table's indexes, including column-list
forms with an option list.
Thanks,
Sho
--
=======================================
*Sho Ito (Sean)*
E-mail: i(dot)sho(dot)0628(at)gmail(dot)com
LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/
<https://www.linkedin.com/in/sho-ito-0628/>*
GitHub: https://github.com/sean0628/
=======================================
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-psql-Fix-REPACK-tab-completion-around-USING-INDEX.patch | application/octet-stream | 2.4 KB |
| v3-0002-psql-Add-regression-tests-for-REPACK-tab-completi.patch | application/octet-stream | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-11-11 05:00:27 | RE: [PATCH] Add a check_hook for output_plugin_libraries |