| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH v1] Fix tab completion for DROP INDEX CONCURRENTLY |
| Date: | 2026-10-19 05:53:42 |
| Message-ID: | 4B32C654-CBF9-4824-BF76-A4B5F7A0D662@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Oct 19, 2026, at 11:02, Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com> wrote:
>
> Hi,
>
> psql currently offers `CASCADE` after `DROP INDEX CONCURRENTLY <index_name>`,
> although the backend rejects that combination [1].
>
> The attached patch limits completion to `RESTRICT` for concurrent index
> drops. Ordinary `DROP INDEX` continues to offer both `CASCADE` and `RESTRICT`.
>
> [1] https://github.com/postgres/postgres/blob/3138f248cd3de43dd0f96760fc666152ea8a5c37/src/backend/commands/tablecmds.c#L1590-L1593
>
> Kind regards,
> Sho Ito
>
> --
> =======================================
> Sho Ito (Sean)
>
> E-mail: i(dot)sho(dot)0628(at)gmail(dot)com
> LinkedIn: https://www.linkedin.com/in/sho-ito-0628/
> GitHub: https://github.com/sean0628/
> =======================================
> <v1-0001-Fix-tab-completion-for-DROP-INDEX-CONCURRENTLY.patch>
Good catch.
```
evantest=# DROP INDEX CONCURRENTLY i
CASCADE RESTRICT
evantest=# DROP INDEX CONCURRENTLY i cascade;
ERROR: DROP INDEX CONCURRENTLY does not support CASCADE
```
The fix looks good to me. I also verified that it only removes “CASCADE” from “DROP INDEX CONCURRENTLY”, while “DROP INDEX” is not affected.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-10-19 06:03:54 | Re: Fix stale allocChunkLimit when recycling AllocSet |
| Previous Message | Michael Paquier | 2026-10-19 05:52:41 | Re: pgstat: don't assert on dropped entries when writing stats file |