> On Nov 9, 2026, at 06:12, Sho Ito <[email protected]> wrote:
>
> Hi hackers,
>
> After a column list, psql's index completion for `REPACK` offers indexes
> from unrelated tables. For example:
>
> ```
> REPACK (ANALYZE) tab1 (c1) USING INDEX <Tab>
> ```
>
> The completion code uses `prev3_wd` as the table name, but that word is
> the column list in this form. The table-specific query returns nothing,
> and completion falls back to listing all indexes.
>
> The attached fix uses `prev4_wd` when a column list is present. It also
> completes `USING INDEX` after the column list.
>
> The regression tests are in a separate patch extending the existing
> `src/bin/psql/t/010_tab_completion.pl`.
>
> Thanks,
> Sho
>
> --
> =======================================
> Sho Ito (Sean)
>
> E-mail: [email protected]
> LinkedIn: https://www.linkedin.com/in/sho-ito-0628/
> GitHub: https://github.com/sean0628/
> =======================================
> <v1-0001-psql-Fix-REPACK-index-completion-after-a-column-list.patch><v1-0001-psql-Test-REPACK-index-completion-after-a-column-list.patch>
Hi Sho,
Thanks for the patches. Both this patch and your other patch, "Complete INDEX
after REPACK USING", look good to me.
Since these two patches are closely related, I would suggest combining them
into a single patch. I applied this patch first, but when I tried to apply the
other one, I encountered a conflict. Combining them would make it easier for
reviewers and committers to review and apply the changes.
One other minor nit is that the test patch should normally be named v1-0002
rather than v1-0001. If you put both commits on the same branch and run "git
format-patch", it will generate two patch files with 0001 and 0002 prefixes,
respectively.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/